<include file='./header' />
<meta http-equiv="Content-Type" content="text/html" charset="utf-8" />
<script type="text/javascript" src="__ROOT__/js/My97DatePicker/WdatePicker.js"></script>
<script type="text/javascript">
$(function() {
	var isadd = {$isadd};
	if(isadd == 1){
		clearall();
		setbtn.click();
        $("#span18").click();
        $("#span18").attr("class","on");
	}
	
	Pageload();
    Pageclick();
    contrlImg();
    $('#setbtn').on('click', function(e) {
    	clearall();
        //tabs(".addInvest_tab","on",".addInvest_con");
        $("#span18").click();
        $("#span18").attr("class","on");
    });
    $("#aclose").on('click', function(e) {
    	$("#hidflag").val(0);
    	$("#hidv").val(0);
    });
})


//收缩展开按钮图片控制
function contrlImg(){   
    $(".ctr_img").click(function (){        
        if($(this).parent("td").parent("tr").next("tr").is(':hidden')){
            $(this).parent("td").parent("tr").next("tr").show();
            $(this).children("img").attr("src","__ROOT__/images/details_close.png");
        }
        else{
            $(this).parent("td").parent("tr").next("tr").hide();
            $(this).children("img").attr("src","__ROOT__/images/details_open.png");
        }
        $("#closeAll").removeClass("active");
        $("#openAll").removeClass("active");
    });
    $("#closeAll").click(function(){
        $(".zhmx_table table tr").show();
        $(".tr_detail").hide();
        $(".ctr_img").children("img").attr("src","__ROOT__/images/details_open.png");
        $(this).addClass("active").siblings("span").removeClass("active");
    }); 
    $("#openAll").click(function(){
        $(".zhmx_table table tr").show();
        $(".ctr_img").children("img").attr("src","__ROOT__/images/details_close.png");
        $(this).addClass("active").siblings("span").removeClass("active");
    });
}

function Pageload(){
	//银行存款
    div_17L();
    //理财产品
    div_18L();
    //股票债劵
    div_19L();
    //保险  
    div_13L();
    //房车
    div_20L();
    //贵重物品及其它
    div_21L();
    //欠款
    div_30L();
}

function div_17L(){
    $("#txtMoney17").blur(function() {                 
       if(!ismoney($.trim($("#txtMoney17").val()))){
           spanshow("spanMoney17","金额格式错误");
       }else{
           spanhide("spanMoney17");
       }     
    });
}

function div_18L(){
    $('#txtproductID18').bind('input propertychange', function() {
    	SearchResult(this.value,'18');
    }); 
    $("#pjgmc18").hide();
    $("#pmc18").show();  
    $("#pje18").hide();
    $("#pqx18").hide();  
    $("#pqxrq18").hide();
    $("#psy18").hide();
    $("#plx18").hide();
    $("#pbtn18").hide();
    $("#pgmrq18").hide();
    $("#pzglx18").hide();
    $("#pgmfe18").hide();  
    $("#psxf18").hide();
    $("#pjjlx18").hide();
    $("#pbz18").hide();
    
    $("#txtmoney18").blur(function() {                 
       if(!ismoney($.trim($("#txtmoney18").val()))){
           spanshow("spanmoney18","购买金额格式错误");
       }else{
           spanhide("spanmoney18");
       }     
    });
    $("#txtbuyshare18").blur(function() {                 
        if(!ismoney($.trim($("#txtbuyshare18").val()))){
            spanshow("spanbuyshare18","购买份额格式错误");
        }else{
            spanhide("spanbuyshare18");
        }     
     });
   
    $("#txtprice18").blur(function() {                 
        if(!ismoney($.trim($("#txtprice18").val()))){
            spanshow("spanprice18","手续费格式错误");
        }else{
            spanhide("spanprice18");
        }     
     });
    
    $("#txtrate18").blur(function() {                 
        if(!ismoney($.trim($("#txtrate18").val()))){
            spanshow("spanrate18","收益率格式错误");
        }else{
            spanhide("spanrate18");
        }     
     });
    
    $("#txtlimit18").blur(function() {                 
        if(!isint($.trim($("#txtlimit18").val()))){
            spanshow("spanlimit18","期限格式错误");
        }else{
            spanhide("spanlimit18");
        }     
     });
    $("#txtbuytime18").focus(function() {                 
    	WdatePicker();
    	var jinger = $.trim($("#txtmoney18").val());
		var fener = $.trim($("#txtbuyshare18").val());
		var pid = $("#hidpid").val();
		var date = $.trim($("#txtbuytime18").val());
		if(date != ""){
			if(fener != "" && jinger == ""){
				if(!ismoney(fener)){
		     		  return false;
	            }
				$.ajax({  
			        type: "post",  
			        url: "__URL__/GetFenErByJingEr",
			        dataType: 'json',
			        data: {pid:pid,fener:fener,date:date},  
			        beforeSend: function(XMLHttpRequest){
			        },  
			        success: function(json){
			        	if(json.data != "-1"){
			        		$("#txtmoney18").val(json.data);
			        	}
			        } 
			    })
			}else if(fener == "" && jinger != ""){
				if(!ismoney(jinger)){
		            return false;
		        }  
				$.ajax({  
			        type: "post",  
			        url: "__URL__/GetJingErByFenEr",
			        dataType: 'json',
			        data: {pid:pid,jinger:jinger,date:date},  
			        beforeSend: function(XMLHttpRequest){
			        },  
			        success: function(json){
			        	if(json.data != "-1"){
			        		$("#txtbuyshare18").val(json.data);
			        	}
			        } 
			    })
			}else{
				$.ajax({  
			        type: "post",  
			        url: "__URL__/GetFenErByJingEr",
			        dataType: 'json',
			        data: {pid:pid,fener:fener,date:date},  
			        beforeSend: function(XMLHttpRequest){
			        },  
			        success: function(json){
			        	if(json.data != "-1"){
			        		$("#txtmoney18").val(json.data);
			        	}
			        } 
			    })
			}
		}

     });
    
    $(".radioItem18").change(function() {
        var selectedvalue = $("input[name='radSortName18']:checked").val();  
        getdivshow(selectedvalue,'18'); 
    }); 
}

function div_19L(){
    $('#txtproductID19').bind('input propertychange', function() {
       SearchResult(this.value,'19');
    }); 
    $("#pmc18").show();  
    $("#pje19").hide(); 
    $("#pgs19").hide(); 
    $("#pjg19").hide();  
    $("#pgmrq19").hide();
    $("#pbtn19").hide();
    $("#pbz19").hide();
    
    $("#txtmoney19").blur(function() {                 
       if(!ismoney($.trim($("#txtmoney19").val()))){
           spanshow("spanmoney19","金额格式错误");
       }else{
           spanhide("spanmoney19");
       }     
    });
    $("#txtprice19").blur(function() {                 
       if(!ismoney($.trim($("#txtprice19").val()))){
           spanshow("spanprice19","单价格式错误");
       }else{
           spanhide("spanprice19");
       }     
    });  
    $("#txtshare19").blur(function() {                 
       if(!isint($.trim($("#txtshare19").val()))){
           spanshow("spanshare19","股数格式错误");
       }else{
           spanhide("spanshare19");
       }     
    });
}

function div_13L(){
    //$('#txtproductID13').bind('input propertychange', function() {
    //    SearchResult(this.value,'13');
    // }); 
	//$("#pmc13").show();
	//$("#plx13").hide();
	//$("#pbe13").hide();
	//$("#pbf13").hide();
	//$("#pjfrq13").hide();
	//$("#ptxrq13").hide();
	//$("#pbz13").hide();
	//$("#pbtn13").hide();
	$("#pmc13").show();
	$("#plx13").show();
	$("#pbe13").show();
	$("#pbf13").show();
	$("#pjfrq13").show();
	$("#ptxrq13").show();
	$("#pbz13").show();
	$("#pbtn13").show();
	
    $("#txtcoverage13").blur(function() {                 
       if(!ismoney($.trim($("#txtcoverage13").val()))){
           spanshow("spancoverage13","保额格式错误");
       }else{
           spanhide("spancoverage13");
       }     
    });  
    $("#txtpremium13").blur(function() {                 
       if(!ismoney($.trim($("#txtpremium13").val()))){
           spanshow("spanpremium13","保费格式错误");
       }else{
           spanhide("spanpremium13");
       }     
    });  
    $("#txtpayment13").blur(function() {                 
       if($.trim($("#txtpayment13").val()) == ""){
           spanshow("spanpayment13","缴费日期不能为空");
       }else{
           spanhide("spanpayment13");
       }     
    });
}

function div_20L(){
	$("#pmc20").hide();
	$("#pssmc20").hide();
	$("#pxqmc20").hide();
	$("#pgmje20").hide();
	$("#pfwmj20").hide();
	$("#pgmrq20").hide();
	$("#ppp20").hide();
	$("#pbz20").hide();
	$("#pbtn20").show();
	var selectedvalue = $("input[name='radSortName20']:checked").val();  
	getdivshow(selectedvalue,'20'); 
	
	$("#selprovince20").change(function() { 
		getprovince();
	});
	
	$("#selcity20").change(function() { 
		getcity();
	});
	
	$("#selarea20").change(function() { 
		getarea();
	});

    $(".radioItem20").change(function() {
        var selectedvalue = $("input[name='radSortName20']:checked").val();  
        getdivshow(selectedvalue,'20'); 
    });
    
    $("#txtmoney20").blur(function() {                 
        if(!ismoney($.trim($("#txtmoney20").val()))){
            spanshow("spanmoney20","购买金额格式错误");
        }else{
            spanhide("spanmoney20");
        }     
     }); 
    $("#txtspace20").blur(function() {                 
        if(!ismoney($.trim($("#txtspace20").val()))){
            spanshow("spanspace20","房屋面积格式错误");
        }else{
            spanhide("spanspace20");
        }     
     }); 
}

function getprovince(){
	var pid = $("#selprovince20").val();
	if(pid != "-1"){
	    $.ajax({  
	        type: "post",  
	        async:false,
	        url: "__URL__/getCityInfo",
	        dataType: 'json',
	        data: {pid:pid},  
	        beforeSend: function(XMLHttpRequest){
	        },  
	        success: function(json){
                $("#selcity20").empty();
                $("#selarea20").empty()
                var a = "<option value='-1'>选择地区</option>";
                $("#selarea20").append(a);
                
                var count = json.length;
                var i = 0;
                var b="<option value='-1'>选择城市</option>";
                for(i=0;i<count;i++){
                    b+="<option value='"+json[i].cityID+"'>"+json[i].city+"</option>";
                }
                $("#selcity20").append(b);
	        } 
	    })
	}else{
		$("#selcity20").empty();
        var a = "<option value='-1'>选择城市</option>";
        $("#selcity20").append(a);
        $("#selarea20").empty()
        a = "<option value='-1'>选择地区</option>";
        $("#selarea20").append(a);
	}
}

function getcity(){
	var cid = $("#selcity20").val();
	if(cid != "-1"){
	    $.ajax({  
	        type: "post", 
	        async:false,
	        url: "__URL__/getAreaInfo",
	        dataType: 'json',
	        data: {cid:cid},  
	        beforeSend: function(XMLHttpRequest){
	        },  
	        success: function(json){
                $("#selarea20").empty();
                var count = json.length;
                var i = 0;
                var b="<option value='-1'>选择地区</option>";
                for(i=0;i<count;i++){
                    b+="<option value='"+json[i].areaID+"'>"+json[i].area+"</option>";
                }
                $("#selarea20").append(b);
	        } 
	    })
	    spanhide("spanpc20");
	}
}

function getarea(){
	var aid = $("#selarea20").val();
    if(aid != "-1"){
    	spanhide("spanpc20");
    }
}

function div_21L(){
    $("#txtmoney21").blur(function() {                 
        if(!ismoney($.trim($("#txtmoney21").val()))){
            spanshow("spanmoney21","购买金额格式错误");
        }else{
            spanhide("spanmoney21");
        }     
     }); 
}

function div_30L(){
	$("#plx30").show();
	$("#pdklx30").hide();
	$("#pyhmc30").hide();
	$("#pyhkje").hide();
	$("#pqkje30").hide();
	$("#phkrq30").hide();
	$("#pjkrq30").hide();
	$("#pbz30").hide();
	$("#ptxrq30").hide();
	$("#pbtn30").show();
	
	var selectedvalue = $("input[name='radSortName30']:checked").val();
	getdivshow(selectedvalue,'30'); 
	$(".radioItem30").change(function() {
		var selectedvalue = $("input[name='radSortName30']:checked").val();
		getdivshow(selectedvalue,'30'); 
	});	
    $("#txtmoney30").blur(function() {                 
        if(!ismoney($.trim($("#txtmoney30").val()))){
            spanshow("spanmoney30","欠款金额格式错误");
        }else{
            spanhide("spanmoney30");
        }     
     });
    $("#txtrepayment30").blur(function() {                 
        if(!ismoney($.trim($("#txtrepayment30").val()))){
            spanshow("spanrepayment30","月还款金额格式错误");
        }else{
            spanhide("spanrepayment30");
        }     
     }); 
}
	
function Pageclick(){
    $("#btnadd17").click(function (){        
    	if($("#hidv").val() > 0){
        	updatecash();	
        }else{
    		addcash(0);
        }
    });  
    $("#btnaddall17").click(function (){     	
    	addcash(1);
    }); 
    $("#btnadd18").click(function (){        
    	if($("#hidv").val() > 0){
    		updatelccp();	
        }else{
    		addlccp(0);
        }
    });
    $("#btnaddall18").click(function (){  
        addlccp(1);
    });   
    $("#btnadd19").click(function (){        
        addgp(0);
    });
    $("#btnaddall19").click(function (){  
        addgp(1);
    }); 
    $("#btnadd13").click(function (){        
    	if($("#hidv").val() > 0){
    		updatebx();
    	}else{
    		addbx(0);
    	}
    });
    $("#btnaddall13").click(function (){  
        addbx(1);
    }); 
    $("#btnadd20").click(function (){        
    	if($("#hidv").val() > 0){
            updatefc();	
        }else{
        	addfc(0);
        }
    });
    $("#btnaddall20").click(function (){  
    	addfc(1);
    }); 
    $("#btnadd21").click(function (){        
    	if($("#hidv").val() > 0){
            updateqt();	
        }else{
        	addqt(0);
        }
    });
    $("#btnaddall21").click(function (){  
    	addqt(1);
    }); 
    $("#btnadd30").click(function (){        
    	if($("#hidv").val() > 0){
            updateqk();	
        }else{
        	addqk(0);
        }
    });
    $("#btnaddall30").click(function (){  
    	addqk(1);
    }); 
}

//银行存款添加
function addcash(otype){
    var currencyid= $("#selcurrency17").val();
    var money = $.trim($("#txtMoney17").val());
    var memo = $.trim($("#txtmemo17").val());
    if(currencyid == "-1"){
        spanshow("spancurrency17","请选择币种");
        return false;
    }
    if(!ismoney($.trim($("#txtMoney17").val()))){
       return false;
    }
    if(memo.length > 100){
        spanshow("spanmemo17","备注不能超过100个字");
        return false;
    }
	
    $.ajax({  
    type: "post",  
    url: "__URL__/addcash",
    dataType: 'json',
    data: {currencyid:currencyid,money:money,memo:memo}, 
    beforeSend: function(XMLHttpRequest){
    },  
    success: function(json){
    	switch(json.status){
            case 1:
                if(otype == 0){
                    clearall();
                    $("#aclose").click();
                    location.reload();                    
                }else{
                    clearall();
                    alert("添加成功");
                }
            break;
            default:
            	alert("添加失败");
            break;
        }
    } 
})
}

//银行存款修改
function updatecash(){
	    var v = $("#hidv").val();
	    var currencyid= $("#selcurrency17").val();
	    var money = $.trim($("#txtMoney17").val());
	    var memo = $.trim($("#txtmemo17").val());
	    if(currencyid == "-1"){
	        spanshow("spancurrency17","请选择币种");
	        return false;
	    }
	    if(!ismoney($.trim($("#txtMoney17").val()))){
	       return false;
	    }
	    if(memo.length > 100){
	        spanshow("spanmemo17","备注不能超过100个字");
	        return false;
	    } 
	    $.ajax({  
	    type: "post",  
	    url: "__URL__/updatecash",
	    dataType: 'json',
	    data: {v:v,currencyid:currencyid,money:money,memo:memo}, 
	    beforeSend: function(XMLHttpRequest){
	    },  
	    success: function(json){
	    	switch(json.status){
	            case 1:
	            	clearall();
	            	$("#aclose").click();
	            	location.reload();
	            break;
	            default:
	            	alert("修改失败");
	            break;
	        }
	    } 
	})
}

//理财产品添加
function addlccp(otype){
    var type = $("input[name='radSortName18']:checked").val();
    var type1 = $("input[name='radSortName18_1']:checked").val();
    var type2 = $("input[name='radSortName18_2']:checked").val();
    var institution = $.trim($("#txtinstitution18").val());
    var productid = $("#hidpid").val();
    var productname = $.trim($("#txtproductID18").val());
    var money = $.trim($("#txtmoney18").val());
    var limit = $.trim($("#txtlimit18").val());
    var startdate = $.trim($("#txtStartDate18").val());
    var rate = $.trim($("#txtrate18").val());
    var purchase = $.trim($("#txtpurchase18").val());
    var buytime = $.trim($("#txtbuytime18").val());
    var buyshare = $.trim($("#txtbuyshare18").val());
    var price = $.trim($("#txtprice18").val());
    var memo = $.trim($("#txtmemo18").val());
    
    if(productid == ""){
        spanshow("spanproductID18","请选择产品");
        return false;
    }
    if(productid == "0"){
        if(productname == ""){
            spanshow("spanproductID18","名称不能为空");
            return false;
        }   
    }
    //理财产品 国债  P2P
    if(type == 4 || type == 23 || type == 34 || type == 59){
    	if(!ismoney(money)){
            spanshow("spanmoney18","购买金额格式错误");
            return false;
         }
    	if(!isint(limit)){
            spanshow("spanlimit18","期限格式错误");
            return false;
        }
        if(!ismoney(rate)){
           spanshow("spanrate18","收益格式错误");
           return false;
        }
        if(buytime == ""){
           spanshow("spanbuytime18","购买日期不能为空");
           return false;
        }
    }
    //基金
    else if(type == 3){
    	if(institution == ""){
           spanshow("spaninstitution18","购买机构不能为空");
           return false; 
        }
        if(!ismoney(money)){
           spanshow("spanmoney18","购买金额格式错误");
           return false;
        }
    	if(!ismoney(buyshare)){
            spanshow("spanbuyshare18","购买份额格式错误");
            return false;
        }
        if(!ismoney(price)){
            spanshow("spanprice18","手续费额格式错误");
            return false;
         }
        if(buytime == ""){
           spanshow("spanbuytime18","购买日期不能为空");
           return false;
        }
    }
    //信托  资管
    else if(type == 7 || type == 22){
        if(!ismoney(money)){
            spanshow("spanmoney18","购买金额格式错误");
            return false;
         }
    	if(!isint(limit)){
            spanshow("spanlimit18","期限格式错误");
            return false;
        }
        if(!ismoney(rate)){
           spanshow("spanrate18","收益格式错误");
           return false;
        }
        if(startdate == ""){
           spanshow("spanStartDate18","起息日期不能为空");
           return false;
        }
    }else{
        return false;
    }
    
    if(!ismoney(money)){
       spanshow("spanmoney18","金额格式错误");
       return false;
    }
    if(memo.length > 100){
        spanshow("spanmemo18","备注不能超过100个字");
        return false;
    }
    $.ajax({  
    type: "post",  
    url: "__URL__/addlccp",
    dataType: 'json',
    data: {type:type,institution:institution,productid:productid,productname:productname,money:money,limit:limit,startdate:startdate,rate:rate,purchase:purchase,buytime:buytime,buyshare:buyshare,price:price,type1:type1,type2:type2,memo:memo}, 
    beforeSend: function(XMLHttpRequest){
    },  
    success: function(json){
        switch(json.status){
            case 1:
            	$("#hidtypeid").val("");
            	if(otype == 0){
                    clearall();
                    $("#aclose").click();
                }else{
                    clearall();
                    alert("添加成功");
                }
            break;
            case -2:
                alert("添加失败");
            break;         
            default:
                
            break;
        }
    } 
})
    
}

//理财产品修改
function updatelccp(){
    var v = $("#hidv").val();
    var type = $("input[name='radSortName18']:checked").val();
    var type1 = $("input[name='radSortName18_1']:checked").val();
    var type2 = $("input[name='radSortName18_2']:checked").val();
    var institution = $.trim($("#txtinstitution18").val());
    var productid = $("#hidpid").val();
    var productname = $.trim($("#txtproductID18").val());
    var money = $.trim($("#txtmoney18").val());
    var limit = $.trim($("#txtlimit18").val());
    var startdate = $.trim($("#txtStartDate18").val());
    var rate = $.trim($("#txtrate18").val());
    var purchase = $.trim($("#txtpurchase18").val());
    var buytime = $.trim($("#txtbuytime18").val());
    var buyshare = $.trim($("#txtbuyshare18").val());
    var price = $.trim($("#txtprice18").val());
    var memo = $.trim($("#txtmemo18").val());
    
    if(productid == ""){
        spanshow("spanproductID18","请选择产品");
        return false;
    }
    if(productid == "0"){
        if(productname == ""){
            spanshow("spanproductID18","名称不能为空");
            return false;
        }   
    }
    //理财产品 国债  P2P
    if(type == 4 || type == 23 || type == 34){
    	if(!ismoney(money)){
            spanshow("spanmoney18","购买金额格式错误");
            return false;
         }
    	if(!isint(limit)){
            spanshow("spanlimit18","期限格式错误");
            return false;
        }
        if(!ismoney(rate)){
           spanshow("spanrate18","收益格式错误");
           return false;
        }
        if(buytime == ""){
           spanshow("spanbuytime18","购买日期不能为空");
           return false;
        }
    }
    //基金
    else if(type == 3){
    	if(institution == ""){
           spanshow("spaninstitution18","购买机构不能为空");
           return false; 
        }
        if(!ismoney(money)){
           spanshow("spanmoney18","购买金额格式错误");
           return false;
        }
    	if(!ismoney(buyshare)){
            spanshow("spanbuyshare18","购买份额格式错误");
            return false;
        }
        if(!ismoney(price)){
            spanshow("spanprice18","手续费额格式错误");
            return false;
         }
        if(buytime == ""){
           spanshow("spanbuytime18","购买日期不能为空");
           return false;
        }
    }
    //信托  资管
    else if(type == 7 || type == 22){
        if(!ismoney(money)){
            spanshow("spanmoney18","购买金额格式错误");
            return false;
         }
    	if(!isint(limit)){
            spanshow("spanlimit18","期限格式错误");
            return false;
        }
        if(!ismoney(rate)){
           spanshow("spanrate18","收益格式错误");
           return false;
        }
        if(startdate == ""){
           spanshow("spanStartDate18","起息日期不能为空");
           return false;
        }
    }else{
        return false;
    }
    
    if(!ismoney(money)){
       spanshow("spanmoney18","金额格式错误");
       return false;
    }
    if(memo.length > 100){
        spanshow("spanmemo18","备注不能超过100个字");
        return false;
    }
    $.ajax({  
    type: "post",  
    url: "__URL__/updatelccp",
    dataType: 'json',
    data: {v:v,type:type,institution:institution,productid:productid,productname:productname,money:money,limit:limit,startdate:startdate,rate:rate,purchase:purchase,buytime:buytime,buyshare:buyshare,price:price,type1:type1,type2:type2,memo:memo}, 
    beforeSend: function(XMLHttpRequest){
    },  
    success: function(json){
        switch(json.status){
	        case 1:
	        	clearall();
	        	$("#aclose").click();
	        	location.reload();
	        break;
	        default:
	        	alert("修改失败");
	        break;
        }
    } 
})    
}

//股票
function addgp(otype){
    var productid = $("#hidpid").val();
    var productname = $.trim($("#txtproductID19").val());
    var money = $.trim($("#txtmoney19").val());
    var share = $.trim($("#txtshare19").val());
    var price = $.trim($("#txtprice19").val());
    var buytime = $.trim($("#txtbuytime19").val());
    var memo = $.trim($("#txtmemo19").val());
   
    if(productid == ""){
        spanshow("spanproductID19","请选择产品");
        return false;
    }
    if(productid == "0"){
        if(productname == ""){
            spanshow("spanproductID19","名称不能为空");
            return false;
        }   
    }
    if(!ismoney(money)){
       spanshow("spanmoney19","金额格式错误");
       return false;
    }
	if(!isint(share)){
        spanshow("spanshare19","购买股数格式错误");
        return false;
    }
    if(!ismoney(price)){
        spanshow("spanprice19","购买单价格式错误");
        return false;
     }
    if(buytime == ""){
        spanshow("spanbuytime19","购买日期格式错误");
        return false;
    }
    if(memo.length > 100){
        spanshow("spanmemo19","备注不能超过100个字");
        return false;
    }
    
    $.ajax({  
    type: "post",  
    url: "__URL__/addgp",
    dataType: 'json',
    data: {productid:productid,productname:productname,money:money,share:share,price:price,buytime:buytime,memo:memo},  
    beforeSend: function(XMLHttpRequest){
    },  
    success: function(json){
        switch(json.status){
            case 1:
                if(otype == 0){
                    clearall();
                    $("#aclose").click();
                }else{
                    spanhide("spanproductID19");
                    $("#txtproductID19").focus();
                    clearall();
                    alert("添加成功");
                }
            break;
            case -2:
                alert("添加失败");
            break;         
            default:
                
            break;
        }
    } 
})   
}

//保险添加
function addbx(otype){
	var type = $("input[name='radSortName13']:checked").val();
    //var productid = $("#hidpid").val();
    var productid = 0;
    var productname = $.trim($("#txtproductID13").val());
    var coverage = $.trim($("#txtcoverage13").val());
    var premium = $.trim($("#txtpremium13").val());
    var payment = $.trim($("#txtpayment13").val());
    var memo = $.trim($("#txtmemo13").val());
    var ismessage = 0;

    if($("#chkismessage13").prop("checked")==true){
    	ismessage = 1;
    }else{
    	ismessage = 0;
    }
    if(productname == ""){
       spanshow("spanproductname13","产品名称不能为空");
       return false; 
    }
    if(!ismoney(coverage)){
       spanshow("spancoverage13","保额格式错误");
       return false;
    }
    if(!ismoney(premium)){
       spanshow("spanpremium13","保费格式错误");
       return false;
    }
    if(payment == ""){
       spanshow("spanpayment13","缴费日期不能为空");
       return false;
    }
    if(memo.length > 100){
        spanshow("spanmemo13","备注不能超过100个字");
        return false;
    }

    $.ajax({  
    type: "post",  
    url: "__URL__/addbx",
    dataType: 'json',
    data: {type:type,productid:productid,productname:productname,coverage:coverage,premium:premium,payment:payment,ismessage:ismessage,memo:memo},  
    beforeSend: function(XMLHttpRequest){
    },  
    success: function(json){
    	switch(json.status){
        	case 1:
                if(otype == 0){
                    clearall();
                    $("#aclose").click();
                }else{
                    clearall();
                    alert("添加成功");
                }
            break;
            case -2:
                alert("添加失败");
            break;         
            default:
                
            break;
        }
    } 
})   
}

//保险修改
function updatebx(){
	var v = $("#hidv").val();
	var type = $("input[name='radSortName13']:checked").val();
    var productid = 0;
    var productname = $.trim($("#txtproductID13").val());
    var coverage = $.trim($("#txtcoverage13").val());
    var premium = $.trim($("#txtpremium13").val());
    var payment = $.trim($("#txtpayment13").val());
    var memo = $.trim($("#txtmemo13").val());
    var ismessage = 0;

    if($("#chkismessage13").prop("checked")==true){
    	ismessage = 1;
    }else{
    	ismessage = 0;
    }
    if(productname == ""){
       spanshow("spanproductname13","产品名称不能为空");
       return false; 
    }
    if(!ismoney(coverage)){
       spanshow("spancoverage13","保额格式错误");
       return false;
    }
    if(!ismoney(premium)){
       spanshow("spanpremium13","保费格式错误");
       return false;
    }
    if(payment == ""){
       spanshow("spanpayment13","缴费日期不能为空");
       return false;
    }
    if(memo.length > 100){
        spanshow("spanmemo13","备注不能超过100个字");
        return false;
    }

    $.ajax({  
    type: "post",  
    url: "__URL__/updatebx",
    dataType: 'json',
    data: {v:v,type:type,productid:productid,productname:productname,coverage:coverage,premium:premium,payment:payment,ismessage:ismessage,memo:memo},  
    beforeSend: function(XMLHttpRequest){
    },  
    success: function(json){
    	switch(json.status){
	        case 1:
	        	clearall();
	        	$("#aclose").click();
	        	location.reload();
	        break;
	        default:
	        	alert("修改失败");
	        break;
	   	}
    } 
}) 
	
}

//房车添加
function addfc(otype){
	var type = $("input[name='radSortName20']:checked").val();
	var housename = $.trim($("#txthousename20").val());
	var brand = $.trim($("#txtbrand20").val());
	var province = $("#selprovince20").val();
	var city = $("#selcity20").val();
	var area = $("#selarea20").val();
	var community = $.trim($("#txtcommunity20").val());
	var money = $.trim($("#txtmoney20").val());
	var space = $.trim($("#txtspace20").val());
	var buytime = $.trim($("#txtbuytime20").val());
	var memo = $.trim($("#txtmemo20").val());
    if(type == "15"){
		if(housename == ""){
	       spanshow("spanhousename20","房屋名称不能为空");
	       return false; 
	    }
		if(province == "-1"){
	       spanshow("spanpc20","请选择省份");
	       return false; 
		}
		if(city == "-1"){
	       spanshow("spanpc20","请选择城市");
	       return false; 
		}
		if(area == "-1"){
	       spanshow("spanpc20","请选择地区");
	       return false; 
		}
		if(community == ""){
	       spanshow("spanpc20","小区名称不能为空");
	       return false; 
		}
	    if(!ismoney(space)){
	        spanshow("spanspace20","房屋面积格式错误");
	        return false;
	    }
    }else if(type == "16"){
    	if(brand == ""){
	        spanshow("spanbrand20","品牌不能为空");
	        return false;
    	}
    }
    if(!ismoney(money)){
        spanshow("spanmoney20","购买金额格式错误");
        return false;
    }
	if(buytime == ""){
        spanshow("spanbuytime20","购买日期不能为空");
        return false;
	}
    if(memo.length > 100){
        spanshow("spanmemo20","备注不能超过100个字");
        return false;
    }
	  $.ajax({  
		    type: "post",  
		    url: "__URL__/addfc",
		    dataType: 'json',
		    data: {type:type,housename:housename,brand:brand,province:province,city:city,area:area,community:community,money:money,space:space,buytime:buytime,memo:memo},  
		    beforeSend: function(XMLHttpRequest){
		    },  
		    success: function(json){
		    	switch(json.status){
		        	case 1:
	        		    $("#selcity20").empty();
	        		    $("#selarea20").empty();
	        		    $("#selcity20").append("<option value='-1'>选择城市</option>");
	        		    $("#selarea20").append("<option value='-1'>选择地区</option>");
		        		if(otype == 0){
		                    clearall();
		                    $("#aclose").click();
		                }else{
		                    clearall();
		                    alert("添加成功");
		                }
		            break;
		            case -2:
		                alert("添加失败");
		            break;         
		            default:
		                
		            break;
		        }
		    } 
		})  
}
//房车修改
function updatefc(){
	var v = $("#hidv").val();
	var type = $("input[name='radSortName20']:checked").val();
	var housename = $.trim($("#txthousename20").val());
	var brand = $.trim($("#txtbrand20").val());
	var province = $("#selprovince20").val();
	var city = $("#selcity20").val();
	var area = $("#selarea20").val();
	var community = $.trim($("#txtcommunity20").val());
	var money = $.trim($("#txtmoney20").val());
	var space = $.trim($("#txtspace20").val());
	var buytime = $.trim($("#txtbuytime20").val());
	var memo = $.trim($("#txtmemo20").val());
    if(type == "15"){
		if(housename == ""){
	       spanshow("spanhousename20","房屋名称不能为空");
	       return false; 
	    }
		if(province == "-1"){
	       spanshow("spanpc20","请选择省份");
	       return false; 
		}
		if(city == "-1"){
	       spanshow("spanpc20","请选择城市");
	       return false; 
		}
		if(area == "-1"){
	       spanshow("spanpc20","请选择地区");
	       return false; 
		}
		if(community == ""){
	       spanshow("spanpc20","小区名称不能为空");
	       return false; 
		}
	    if(!ismoney(space)){
	        spanshow("spanspace20","房屋面积格式错误");
	        return false;
	    }
    }else if(type == "16"){
    	if(brand == ""){
	        spanshow("spanbrand20","品牌不能为空");
	        return false;
    	}
    }
    if(!ismoney(money)){
        spanshow("spanmoney20","购买金额格式错误");
        return false;
    }
	if(buytime == ""){
        spanshow("spanbuytime20","购买日期不能为空");
        return false;
	}
    if(memo.length > 100){
        spanshow("spanmemo20","备注不能超过100个字");
        return false;
    }
	  $.ajax({  
		    type: "post",  
		    url: "__URL__/updatefc",
		    dataType: 'json',
		    data: {v:v,type:type,housename:housename,brand:brand,province:province,city:city,area:area,community:community,money:money,space:space,buytime:buytime,memo:memo},  
		    beforeSend: function(XMLHttpRequest){
		    },  
		    success: function(json){
		    	switch(json.status){
			        case 1:
			        	clearall();
			        	$("#aclose").click();
			        	location.reload();
			        break;
			        default:
			        	alert("修改失败");
			        break;
			   	}
		    } 
		})
}
//其它添加
function addqt(otype){
	var productname = $.trim($("#txtproductName21").val());
	var money = $.trim($("#txtmoney21").val());
	var memo = $.trim($("#txtmemo21").val());
    if(!ismoney(money)){
        spanshow("spanmoney21","购买金额格式错误");
        return false;
    }
	if(productname == ""){
        spanshow("spanproductName21","名称不能为空");
        return false;
	} 
    if(memo.length > 100){
        spanshow("spanmemo21","备注不能超过100个字");
        return false;
    }
	$.ajax({  
	    type: "post",  
	    url: "__URL__/addqt",
	    dataType: 'json',
	    data: {productname:productname,money:money,memo:memo},  
	    beforeSend: function(XMLHttpRequest){
	    },  
	    success: function(json){
	    	switch(json.status){
	        	case 1:
	        		if(otype == 0){
	                    clearall();
	                    $("#aclose").click();
	                }else{
	                    clearall();
	                    alert("添加成功");
	                }
	            break;
	            case -2:
	                alert("添加失败");
	            break;         
	            default:
	                
	            break;
	        }
	    } 
	})  
}

function updateqt(){
	var v = $("#hidv").val();
	var productname = $.trim($("#txtproductName21").val());
	var money = $.trim($("#txtmoney21").val());
	var memo = $.trim($("#txtmemo21").val());
    if(!ismoney(money)){
        spanshow("spanmoney21","购买金额格式错误");
        return false;
    }
	if(productname == ""){
        spanshow("spanproductName21","名称不能为空");
        return false;
	} 
    if(memo.length > 100){
        spanshow("spanmemo21","备注不能超过100个字");
        return false;
    }
	$.ajax({  
	    type: "post",  
	    url: "__URL__/updateqt",
	    dataType: 'json',
	    data: {v:v,productname:productname,money:money,memo:memo},  
	    beforeSend: function(XMLHttpRequest){
	    },  
	    success: function(json){
	    	 switch(json.status){
		        case 1:
		        	clearall();
		        	$("#aclose").click();
		        	location.reload();
		        break;
		        default:
		        	alert("修改失败");
		        break;
	        }
	    } 
	})  
}
//欠款添加
function addqk(otype){
	var type1 = $("input[name='radSortName30']:checked").val();
	var type2 = $("input[name='radSortName30_1']:checked").val();
	var bankid = $("#selbankid30").val();
	var repayment = $.trim($("#txtrepayment30").val());
	var money = $.trim($("#txtmoney30").val());
	var repaymenttime = $.trim($("#txtrepaymenttime30").val());
	var lendtime = $.trim($("#txtlendtime30").val());
	var memo = $.trim($("#txtmemo30").val());
    var ismessage = 0;
    if($("#chkismessage30").prop("checked")==true){
    	ismessage = 1;
    }else{
    	ismessage = 0;
    }
    if(!ismoney(money)){
        spanshow("spanmoney30","欠款金额格式错误");
        return false;
    }
    if(type1 == "31"){
    	//信用卡
    	if(repaymenttime == ""){
    		spanshow("spanrepaymenttime30","还款日期不能为空");
    		return false;
    	}
    }else if(type1 == "32"){
    	//贷款
        if(!ismoney(repayment)){
            spanshow("spanrepayment30","月还款金额格式错误");
            return false;
        }
    	if(repaymenttime == ""){
    		spanshow("spanrepaymenttime30","还款日期不能为空");
    		return false;
    	}
    }else if(type1 == "33"){
    	//借款
    	if(lendtime == ""){
    		spanshow("spanlendtime30","借款日期不能为空");
    		return false;
    	}
    }
    if(memo.length > 100){
        spanshow("spanmemo30","备注不能超过100个字");
        return false;
    }
    $.ajax({  
	    type: "post",  
	    url: "__URL__/addqk",
	    dataType: 'json',
	    data: {type1:type1,type2:type2,bankid:bankid,repayment:repayment,money:money,repaymenttime:repaymenttime,lendtime:lendtime,memo:memo,ismessage:ismessage},  
	    beforeSend: function(XMLHttpRequest){
	    },  
	    success: function(json){
	    	switch(json.status){
	        	case 1:
	        		if(otype == 0){
	                    clearall();
	                    $("#aclose").click();
	                }else{
	                    clearall();
	                    alert("添加成功");
	                }
	            break;
	            case -2:
	                alert("添加失败");
	            break;         
	            default:
	                
	            break;
	        }
	    } 
	})  
}

//欠款修改
function updateqk(){
	var v = $("#hidv").val();
	var type1 = $("input[name='radSortName30']:checked").val();
	var type2 = $("input[name='radSortName30_1']:checked").val();
	var bankid = $("#selbankid30").val();
	var repayment = $.trim($("#txtrepayment30").val());
	var money = $.trim($("#txtmoney30").val());
	var repaymenttime = $.trim($("#txtrepaymenttime30").val());
	var lendtime = $.trim($("#txtlendtime30").val());
	var memo = $.trim($("#txtmemo30").val());
    var ismessage = 0;
    if($("#chkismessage30").prop("checked")==true){
    	ismessage = 1;
    }else{
    	ismessage = 0;
    }
    if(!ismoney(money)){
        spanshow("spanmoney30","欠款金额格式错误");
        return false;
    }
    if(type1 == "31"){
    	//信用卡
    	if(repaymenttime == ""){
    		spanshow("spanrepaymenttime30","还款日期不能为空");
    		return false;
    	}
    }else if(type1 == "32"){
    	//贷款
        if(!ismoney(repayment)){
            spanshow("spanrepayment30","月还款金额格式错误");
            return false;
        }
    	if(repaymenttime == ""){
    		spanshow("spanrepaymenttime30","还款日期不能为空");
    		return false;
    	}
    }else if(type1 == "33"){
    	//借款
    	if(lendtime == ""){
    		spanshow("spanlendtime30","借款日期不能为空");
    		return false;
    	}
    }
    if(memo.length > 100){
        spanshow("spanmemo30","备注不能超过100个字");
        return false;
    }
    $.ajax({  
	    type: "post",  
	    url: "__URL__/updateqk",
	    dataType: 'json',
	    data: {v:v,type1:type1,type2:type2,bankid:bankid,repayment:repayment,money:money,repaymenttime:repaymenttime,lendtime:lendtime,memo:memo,ismessage:ismessage},  
	    beforeSend: function(XMLHttpRequest){
	    },  
	    success: function(json){
	    	switch(json.status){
		        case 1:
		        	clearall();
		        	$("#aclose").click();
		        	location.reload();
		        break;
		        default:
		        	alert("修改失败");
		        break;
	        }
	    } 
	}) 
}

//全部清空
function clearall(){

	//清空文本框
    $('input:text').val("");
    var SelectArr = $("select");  
    for (var i = 0; i < SelectArr.length; i++) 
    {  
        SelectArr[i].options[0].selected = true;   
    }
    $("input[type='checkbox']").attr("checked",false);
    $("#hidpid").val("");
    //$("#hidv").val(0);
    $("#form1").find("textarea").each(function(){  
       this.value = ""; 
	});  

    //银行存款
    div_17L();
    //理财产品
    div_18L();
    //股票
    div_19L();
    //保险  
    div_13L();
    //房车
    div_20L();
    //贵重物品及其它
    div_21L();
    //欠款
    div_30L();
}

function divcontentLoad(div){
    var d = $("div.divinfo"); 
    $(d).each(function(){   
      if($("#divcontent").length && $("#divcontent").length>0){
          $("#divcontent").remove();
      }
   })
   var str = "<div id='divcontent'></div>";
   $('#'+div).append(str);
   $("#divcontent").show();
}

function divcontentDel(){
    var d = $("div.divinfo"); 
    $(d).each(function(){   
      if($("#divcontent").length && $("#divcontent").length>0){
          $("#divcontent").remove();
      }
   })
}

function getlccp(pid,name,sid,id,typeid){
    $("#hidpid").val(pid);
    $("#hidsid").val(sid);
    $("#hidtypeid").val(typeid);
    divcontentDel();
    $("#txtproductID"+id).val(name);
    $("#plx"+id).hide();
    getdivshow(sid,id);
}


function getdivshow(sid,id){
     $("input[name='radSortName"+ id +"'][value='"+ sid +"']").prop("checked",true);
     if(id == "18"){      
         if (sid == "4" || sid == "34"|| sid == "23" || sid == "59") { 
            //理财产品  国债  P2P                    
            $("#pjgmc18").show();
            $("#pmc18").show();  
            $("#pje18").show();
            $("#pqx18").show();  
            $("#pqxrq18").hide();
            $("#psy18").show(); 
            $("#pgmrq18").show();
            $("#pzglx18").hide();
            $("#pgmfe18").hide();  
            $("#psxf18").hide();
            $("#pzglx18").hide();
            $("#pjjlx18").hide();
                   
        }else if(sid == "3"){
            //基金
            $("#pjgmc18").show();
            $("#pmc18").show();  
            $("#pje18").show();
            $("#pqx18").hide();  
            $("#pqxrq18").hide();
            $("#pgmrq18").show();
            $("#psy18").hide();
            $("#pzglx18").hide();
            $("#pgmfe18").show();  
            $("#psxf18").show();
            $("#pzglx18").hide();
            if($("#hidtypeid").val() > 0){
            	$("#pjjlx18").hide();
                $("input[name='radSortName18_2'][value='"+ $("#hidtypeid").val() +"']").prop("checked",true);
            }else{
            	$("#pjjlx18").show();
            }
        }else if(sid == "7" || sid == "22"){
            //信托  资管
            $("#pjgmc18").hide();
            $("#pmc18").show();  
            $("#pje18").show();
            $("#pqx18").show();  
            $("#pqxrq18").show();
            $("#pgmrq18").hide();
            $("#psy18").show();
            $("#pzglx18").show();
            $("#pgmfe18").hide();  
            $("#psxf18").hide();
            $("#pjjlx18").hide();
            $("input[name='radSortName18_1'][value='"+ $("#hidtypeid").val() +"']").prop("checked",true);
        }
        $("#pbz18").show(); 
        $("#pbtn18").show();
    }
    //股票
    if(id == "19"){ 
        $("#pmc19").show(); 
        $("#pje19").show(); 
        $("#pgs19").show(); 
        $("#pjg19").show();  
        $("#pgmrq19").show();
        $("#pbtn19").show();
        $("#pbz19").show();
    }
    //保险
    if(id == "13"){
    	$("#pmc13").show();
    	$("#pbe13").show();
    	$("#pbf13").show();
    	$("#pjfrq13").show();
    	$("#ptxrq13").show();
    	$("#pbz13").show();
    	$("#pbtn13").show();
    	$("input[name='radSortName13']").attr("checked",sid);
    }
    //房车
    if(id == "20"){
    	if(sid == "15"){
    		//房产
    		$("#pmc20").show();
    		$("#pssmc20").show();
    		$("#pxqmc20").show();
    		$("#pgmje20").show();
    		$("#pfwmj20").show();
    		$("#pgmrq20").show();
    		$("#ppp20").hide();
    	}else if(sid == "16"){
    		//汽车
    		$("#pmc20").hide();
    		$("#pssmc20").hide();
    		$("#pxqmc20").hide();
    		$("#pgmje20").show();
    		$("#pfwmj20").hide();
    		$("#pgmrq20").show();
    		$("#ppp20").show();
    	}
    	$("#pbz20").show();
    	$("#pbtn20").show();
    }
    if(id == "21"){
    	$("#pmc21").show();
    	$("#pgmje21").show();
    	$("#pbz21").show();
    	$("#pbtn21").show();
    }
    if(id == "30"){
    	if(sid == "31"){
			//信用卡
			$("#plx30").show();
			$("#pdklx30").hide();
			$("#pyhmc30").show();
			$("#pyhkje").hide();
			$("#pqkje30").show();
			$("#phkrq30").show();
			$("#pjkrq30").hide();
			$("#pbz30").hide();
			$("#ptxrq30").show();
		}else if(sid == "32"){
			//贷款	
			$("#plx30").show();
			$("#pdklx30").show();
			$("#pyhmc30").show();
			$("#pyhkje").show();
			$("#pqkje30").show();
			$("#phkrq30").show();
			$("#pjkrq30").hide();
			$("#pbz30").hide();
			$("#ptxrq30").hide();
			
		}else if(sid == "33"){
			//借款
			$("#plx30").show();
			$("#pdklx30").hide();
			$("#pyhmc30").hide();
			$("#pyhkje").hide();
			$("#pqkje30").show();
			$("#phkrq30").hide();
			$("#pjkrq30").show();
			$("#pbz30").show();
			$("#ptxrq30").hide();
		}
    	$("#pbz30").show();
    	$("#pbtn30").show();
    }
}

function showtype(id){
    $("#plx"+id).show();
    divcontentDel();
    $("#hidtypeid").val("0");
    var sid = $("input[name='radSortName"+ id +"']:checked").val();
    getdivshow(sid,id);
}

function SearchResult(obj,id){
    if($.trim(obj) == ""){
        return false;
    }
    divcontentLoad('div_'+id);
    $.ajax({  
        type: "post",  
        url: "__URL__/searchkey",
        dataType: 'json',
        data: {keyvalue:obj,id:id}, 
        beforeSend: function(XMLHttpRequest){
        },  
        success: function(json){
            var tbody = "";
            if(json != null)
            {
                spanhide('spanproductID'+id);
                var trs = ""; 
                tbody = "";
                trs = "<table><colgroup><col width='60px' /><col /><col width='60px' /></colgroup>";
                $.each(json, function (n, value) {  
                     trs += "<tr onclick=\"getlccp(\'"+ value.productid +"\',\'"+ value.cnname +"\',\'"+ value.frontsortid +"\',\'"+ id + "\',\'"+ value.type + "\')\"><td>" + value.tradecode + "</td> <td>" + value.cnname + "</td><td>"+ value.frontsortname +"</td></tr>";  
                 });
                trs += "</table>";
                tbody = trs;
                $("#divcontent").html(tbody);
            }
            else
            {
                trs = "<table><tr><td><a href='#' onclick='showtype(\""+ id +"\")'>添加</a></td></tr></table>";
                tbody = "没有找到";
                spanshow('spanproductID'+id,tbody);
                $("#hidpid").val("0");
                $("#divcontent").html(trs);
            }
        } 
    })
}

function spanshow(obj,text){
    $("#"+obj).show();
    $("#"+obj).html("<i class='fa fa-times-circle'></i>"+text);    
}

function spanhide(obj){
    $("#"+obj).hide();
    $("#"+obj).html("");    
}

function Cmd(obj){
    if(obj.value=="all"){
        $(".zhmx_table table tr").show();
        //$(".tr_detail").hide();
        $(".ctr_img").children("img").attr("src","__ROOT__/images/details_close.png");
        $("#closeAll").addClass("active").siblings("span").removeClass("active");
        $("#openAll").addClass("active").siblings("span").removeClass("active");
    }
    else{
        $("#zhmx_" + obj.value).show().siblings("tr").hide();
        $("#zhmx_" + obj.value).prev("tr").show();
        $("#zhmx_" + obj.value).prev("tr").find("a.ctr_img img").attr("src","__ROOT__/images/details_close.png");
        $("#zhmx_" + obj.value).prev("tr").siblings("tr").find("a.ctr_img img").attr("src","__ROOT__/images/details_open.png");
        $("#closeAll").removeClass("active");
        $("#openAll").removeClass("active");
    }
}

function setappcode(productid,cnname){
    var rid = $("input[name='radSortName']:checked").val(); 
    $("#txtproductID"+rid).val(cnname);
    $("#divcontent").html("");
    $("#divcontent").hide();
}


/*基金分类判断-朱*/
function fundTpye(fund){
    if(fund=="天弘增利宝"){
        //货币基金
        $("#fundCase1").show();
        $("#fundCase2").hide();
        $("#fundCase2_1_1").hide();$("#fundCase2_1_2").hide();$("#fundCase2_1_3").hide();
        $("#fundCase2_2").hide();
    }else if(fund=="中信证券"){
        //定投基金 或 普通基金
        $("#fundCase1").hide();
        $("#fundCase2").show();
        $("#fundCase2_1_1").hide();$("#fundCase2_1_2").hide();$("#fundCase2_1_3").hide();
        $("#fundCase2_2").hide();
    }else{
        alert("选择‘天弘增利宝’或者‘中信证券’才能看到效果嘿嘿~") 
    }
}
function fundType2(){
    //定投基金
    $("#fundCase1").hide();
    $("#fundCase2").show();
    $("#fundCase2_1_1").show();$("#fundCase2_1_2").show();$("#fundCase2_1_3").show();
    $("#fundCase2_2").hide();
}
function fundType3(){
    //定投基金
    $("#fundCase1").hide();
    $("#fundCase2").show();
    $("#fundCase2_1_1").hide();$("#fundCase2_1_2").hide();$("#fundCase2_1_3").hide();
    $("#fundCase2_2").show();
}

function ismoney(obj){
   var reg=/^(([1-9]\d{0,9})|0)(\.\d{1,4})?$/;
   return reg.test(obj); 
}

function isint(obj){
    var reg=/^[0-9]*[1-9][0-9]*$/;
    return reg.test(obj); 
}

function delop(v,s,o){
	//var thisObj = o.parentNode.parentNode;  
	//var a = $(thisObj).children();  
	//alert(a.eq(0).text());
	if(!confirm("确定删除?")){
		return false;
	} 
	$.ajax({  
	        type: "POST",  
	        url: "__URL__/delop",
	        dataType: 'json',
	        data: {v:v,s:s}, 
	        beforeSend: function(XMLHttpRequest){
	        },  
	        success: function(json){
	        	if(json.data == 1){
	        		$(o).parent().parent().remove(); 
	        	}else{
	        		alert("删除失败");
	        	}
	        } 
	    })
}

function showinfo(v,s){
	$.ajax({  
        type: "POST",  
        url: "__URL__/getInvestInfo",
        dataType: 'json',
        data: {v:v,s:s}, 
        beforeSend: function(XMLHttpRequest){
        },  
        success: function(json){
    	   if(json != null)
           {
    		   $("#hidv").val(json[0].id);
    		   $("#setbtn").click();
    		   if(s == 1){
    			   showdiv(17);
    	  		   $("#hidflag").val(17);
    			   $("#selcurrency17").val(json[0].currencyid);
	    		   $("#txtMoney17").val(json[0].money);
	    		   $("#txtmemo17").val(json[0].memo);
    		   }else if(s == 4 || s == 34|| s == 23 || s == 3 || s == 7 || s == 22){
    			   $("#hidflag").val(18);
    			   $("#hidtypeid").val(json[0].type);
    			   $("#hidpid").val(json[0].productid);
    			   showdiv(18);
    			   getdivshow(s,18); 
    			   $("input[name='radSortName18'][value='"+ json[0].frontsortid +"']").attr("checked",true); 
	    		   $("input[name='radSortName18_1'][value='"+ json[0].type +"']").attr("checked",true); 
	    		   $("input[name='radSortName18_2'][value='"+ json[0].type +"']").attr("checked",true); 
	    		   $("#txtinstitution18").val(json[0].institution);
	    		   $("#txtproductID18").val(json[0].productname);
	    		   var productid = $("#hidpid").val();
	    		   $("#txtmoney18").val(json[0].money);
	    		   $("#txtlimit18").val(json[0].limit);
	    		   $("#txtStartDate18").val(json[0].buytime);
	    		   $("#txtrate18").val(json[0].rate);
	    		   $("#txtbuytime18").val(json[0].buytime);
	    		   $("#txtbuyshare18").val(json[0].buyshare);
	    		   $("#txtprice18").val(json[0].price);
	    		   $("#txtmemo18").val(json[0].memo);
    		   }else if(s == 49){
    			   $("#hidflag").val(21);
    			   showdiv(21);
    			   getdivshow(json[0].frontsortid,21); 
    			   $("#txtproductName21").val(json[0].productname);
    			   $("#txtmoney21").val(json[0].money);
    			   $("#txtmemo21").val(json[0].memo);
    		   }else if(s == 27 || s == 28 || s == 29){
    			   $("#hidflag").val(13);
    			   showdiv(13);
    			   getdivshow(json[0].frontsortid,13);
    				$("input[name='radSortName13'][value='"+ json[0].frontsortid +"']").attr("checked",true); 
    			    var productid = $("#hidpid").val();
    			    $("#txtproductID13").val(json[0].productname);
    			    $("#txtcoverage13").val(json[0].coverage);
    			    $("#txtpremium13").val(json[0].premium);
    			    $("#txtpayment13").val(json[0].paymenttime);
    			    $("#txtmemo13").val(json[0].memo);
    			    if(json[0].ismessage == 1){
    			    	$("#chkismessage13").prop("checked",true);
    			    }else{
    			    	$("#chkismessage13").prop("checked",false);
    			    }
    		   }else if(s == 15 || s == 16){
    			   	$("#hidflag").val(20);
    			   	showdiv(20);
    			   	getdivshow(json[0].frontsortid,20);
   		         	$("#txtmoney20").val(json[0].money);
   		         	$("#txtbuytime20").val(json[0].buytime);
    	         	$("#txtmemo20").val(json[0].memo);
	   		        if(s == 15){
	   		            //房产
	   		            $("input[name='radSortName20'][value='"+ json[0].frontsortid +"']").attr("checked",true); 
	   		         	$("#txthousename20").val(json[0].productname);
	   		         	$("#txtcommunity20").val(json[0].communityname);
	   		            $("#txtspace20").val(json[0].space);
	   		            $("#selprovince20").val(json[0].provinceid);
	   		         	$("#selprovince20").change();
	   		         	$("#selcity20").val(json[0].cityid);
	   		         	$("#selcity20").change();
	   		         	$("#selarea20").val(json[0].areaid);
	   		        }else if(s == 16){
	   		            //汽车
	   		        	$("#txtbrand20").val(json[0].productname);
	   		        }
    		   }else if(s == 31 || s == 32 || s == 33){
    			   $("#hidflag").val(30);
				   	showdiv(30);
				   	getdivshow(json[0].frontsortid,30);
				   	var type1 = json[0].frontsortid;
			        var type2 = json[0].typeid;
			        var bankid = json[0].bankid;
			        var repayment = json[0].repayment;
			        var money = json[0].money;
			        var repaymenttime = json[0].repaymenttime;
			        var lendtime = json[0].lendtime;
			        var memo = json[0].memo;
			        var ismessage = json[0].ismessage;
			        $("#txtmoney30").val(money);
		            $("#txtmemo30").val(memo);
			        if(type1 == 31){
			            //信用卡
			            $("#selbankid30").val(bankid);
			            $("#txtrepaymenttime30").val(repaymenttime);
	    			    if(ismessage == 1){
	    			    	$("#chkismessage30").prop("checked",true);
	    			    }else{
	    			    	$("#chkismessage30").prop("checked",false);
	    			    }

			        }else if(type1 == 32){
			        	//贷款
			            $("input[name='radSortName30_1'][value='"+ json[0].type2 +"']").attr("checked",true);
			            $("#selbankid30").val(bankid);
			            $("#txtrepayment30").val(repayment);
			            $("#txtrepaymenttime30").val(repaymenttime);
			        }else if(type1 == 33){
			            //借款
			            $("#txtlendtime30").val(lendtime);
			        }	   	
    		   }
           }
        } 
    })
}

function showdiv(obj){
	if($("#hidflag").val() != 0){
		if($("#hidflag").val() != obj){
			return false;
		}
	}
	
	var str = "18,17,19,13,20,21,30";
	var domain = str.split(',');
	for(var i=0;i<domain.length;i++){
		if(obj == domain[i]){
			$("#div_content_"+ domain[i]).show();
			$("#span"+ domain[i]).attr("class","on");
		}else{
			$("#div_content_"+ domain[i]).hide();
			$("#span"+ domain[i]).attr("class","");
		}
	}
	if($("#hidflag").val() == 0){
		$("#btnaddall"+ obj).show();
		clearall();
	}else{
		$("#btnaddall"+ obj).hide();
	}
}

</script>

</head>

<body>
<form id="form1">
<input id="hidpid" type="hidden" />
<input id="hidsid" type="hidden" />
<input id="hidtypeid" type="hidden" />
<input id="hidv" type="hidden" value="0"/>
<input id="hidflag" type="hidden" value="0"/>
<!--顶部开始-->
<include file="./top" />
<!--顶部结束-->
<!--左导航开始-->
<include file="./left" />
<!--左导航结束-->
<!--主体开始-->
<div class="main-content">
    <div class="wrapper">
        <!--帐户明细-->
        <div class="panel">
            <div class="panel-head">
                帐户明细
            </div>
            <div class="panel-body">               
                <!--统计/工具-->
                <div class="tj_total left">
                    <dl>
                        <dt>今日变化</dt>
                        <dd><span class="text-danger">↓ -￥320.30（-0.1%）</span></dd>
                    </dl>
                    <dl>
                        <dt>总资产</dt>
                        <dd>￥231,503</dd>
                    </dl>
                    <dl>
                        <dt>负债</dt>
                        <dd>￥10,320</dd>
                    </dl>
                    <dl>
                        <dt>总净资产</dt>
                        <dd>￥492,803</dd>
                    </dl>
                </div>
                <div class="right">
                    <span class="btn btn-warning"><i class="fa fa-download"></i>&nbsp;下载</span>
                    <span class="btn btn-success"><i class="fa fa-print"></i>&nbsp;打印</span>
                    <a class="btn btn-primary" data-reveal-id="addInvest" id="setbtn"><i class="fa fa-money"></i>&nbsp;添加投资</a>
                </div>
                <div class="clear"></div>
                <hr />
                <!--分类筛选操作-->
                <div class="zhmx_sx">
                    <label>资产分类：</label>
                    <select id="" name="chooseType" class="form-control" style="width:100px" onchange="Cmd(this)">
                      <option value="all" name="chooseType">所有分类</option>
                      <option value="ck" name="chooseType">银行存款</option>
                      <option value="lc" name="chooseType">理财产品</option>
                      <option value="gp" name="chooseType">股票</option>
                      <option value="gz" name="chooseType">贵重物品</option>
                      <option value="bx" name="chooseType">保险</option>
                      <option value="cf" name="chooseType">车房</option>
                      <option value="qk" name="chooseType">欠款</option>
                    </select>
                    <div class="btn-group" style="margin-left:10px;">
                        <span class="btn btn-danger btn-sm" id="closeAll">全部收起</span>
                        <span class="btn btn-danger btn-sm active" id="openAll">全部展开</span>
                    </div>
                </div>
                <div class="clear"></div>
                <div class="blank10"></div><div class="blank10"></div>
                <!--大表格-->
                <div class="zhmx_table">
                    <table class="table">
                      <thead>
                          <tr>
                            <th width="25%">分类名称</th>
                            <th width="25%" class="align-right">合计</th>
                            <th width="25%" class="align-right">今日</th>
                            <th class="align-right">累计</th>
                          </tr>
                      </thead>
                      <tbody>
                          <!--银行存款-->
                          <tr>
                            <td><a href="javascript:void(0)" class="ctr_img"><img src="__ROOT__/images/details_close.png" /></a> 银行存款</td>
                            <td class="align-right"><span id="yhcksum"></span></td>
                            <td class="align-right"><span class="text-success"></span></td>
                            <td class="align-right"><span class="text-danger"></span></td>
                          </tr>
                          <tr class="tr_detail" id="zhmx_ck">
                            <td colspan="4" class="table_detail">
                                <div class="zhmx_detail">
                                    <table class="table table-hover table-bordered">
                                      <thead>
                                          <tr>
                                            <th width="20%">币种</th>
                                            <th width="12%" class="align-right">金额</th>
                                            <th>备注</th>
                                            <th width="18%" class="align-center">操作</th>
                                          </tr>
                                      </thead>
                                      <tbody>
	      	                              <?php foreach ($usercashlist as $k => $v):
	      	                              	$countyhck += $v['money'];
	      	                              ?>
	                                       <tr>
                                            <td>{$v['abbreviation']}</td>
                                            <td class="align-right">{$v['money']}</td>
                                            <td>{$v['memo']}</td>
                                            <td class="align-center"><a href="#">添加</a> | <a href="javascript:" onclick="showinfo({$v['id']},{$v['frontsortid']})">修改</a> | <a href="javascript:" onclick="return delop({$v['id']},17,this)">删除</a></td>
                                          </tr>
		                                  <?php endforeach?>
		                                  <script type="text/javascript">
		                                  $("#yhcksum").text({$countyhck});
		                                  </script>
                                      </tbody>
                                      <tfoot>
                                          <tr>
                                            <td>合计</td>
                                            <td colspan="3" class="align-right"><span class="text-danger">￥{$countyhck}</span></td>
                                          </tr>
                                      </tfoot>
                                    </table>
                                </div>
                            </td>
                          </tr>
                          <!--理财产品-->
                          <tr>
                            <td><a href="javascript:void(0)" class="ctr_img"><img src="__ROOT__/images/details_close.png" /></a> 理财产品</td>
                            <td class="align-right" id="lccpsum"></td>
                            <td class="align-right"><span class="text-success">-￥320.30（0.1%） ↓</span></td>
                            <td class="align-right"><span class="text-danger">+￥1500（1%）↑</span></td>
                          </tr>
                          <tr class="tr_detail" id="zhmx_lc">
                            <td colspan="4" class="table_detail">
                                <div class="zhmx_detail">
                                    <div class="zc_type">
                                    	<span class="label label-primary"> 国债、信托、资管、P2P</span>
                                    </div>
                                    <table class="table table-hover table-bordered">
                                      <thead>
                                          <tr>
                                            <th width="20%">名称</th>
                                            <th width="14%" class="align-right">金额</th>
                                            <th width="8%" class="align-right">收益</th>
                                            <th width="12%" class="align-center">到期日</th>
                                            <th width="14%" class="align-right">现值</th>
                                            <th>备注</th>
                                            <th width="18%" class="align-center">操作</th>
                                          </tr>
                                      </thead>
                                      <tbody>
               	      	                  <?php foreach ($userfinproductlist as $k => $v):
	      	                              	$countlccp += $v['money'];
	      	                              ?>
	                                       <tr>
 											<td class="">{$v['productname']}</td>
                                            <td class="align-right">￥{$v['money']}</td>
                                            <td class="align-right">{$v['rate']}%</td>
                                            <td class="align-center">{$v['mydate']}</td>
                                            <td class="align-right"></td>
                                            <td class="align-center">{$v['memo']}</td>
                                            <td class="align-center"><a href="#">添加</a> | <a href="javascript:" onclick="showinfo({$v['id']},{$v['frontsortid']})">修改</a> | <a href="javascript:" onclick="return delop({$v['id']},18,this)">删除</a> | <a href="#">卖出</a></td>
                                          </tr>
		                                  <?php endforeach?>
                                      </tbody>
                                      <tfoot>
                                          <tr>
                                            <td>合计</td>
                                            <td colspan="6" class="align-right"><span class="text-danger">￥{$countlccp}（8%）↑</span></td>
                                          </tr>
                                      </tfoot>
                                    </table>
                                    <div class="zc_type">
                                    	<span class="label label-primary">基金</span>
                                    </div>
                                    <table class="table table-hover table-bordered">
                                      <thead>
                                          <tr>
                                            <th width="20%">机构/名称/代码</th>
                                            <th width="14%" class="align-right">金额</th>
                                            <th width="8%" class="align-right">份额</th>
                                            <th width="15%" class="align-right">日期</th>
                                            <th width="12%" class="align-right">手续费</th>
                                            <!--  <th width="12%" class="align-center">现净值/涨跌</th>
                                            <th width="14%" class="align-right">现值</th>-->
                                            <th>备注</th>
                                            <th width="18%" class="align-center">操作</th>
                                          </tr>
                                      </thead>
                                      <tbody>
                                      
                                       <?php foreach ($userfundlist as $k => $v):
	      	                              	$countjj += $v[1];
											$countjjzd += $v[2];
	      	                              ?>
	                                       <tr>
                                          <td class="">{$v['institution']} / {$v['productname']} / {$v['tradecode']}</td>
                                            <td class="align-right">￥{$v['money']}</td>
                                            <td class="align-right">{$v['buyshare']}</td>
                                            <td class="align-right">{$v['buytime']}</td>
                                            <td class="align-right">{$v['price']}%</td>
                                            <!--  <td class="align-center">{$v[2]}
                                            <?php if($v['type'] <> 5){
                                           			if($v[0] < 0){
												?>
                                           		 （<span class="text-success">{$v[0]}%↓</span>）
                                           		 <?php }else{
                                           		 ?>
													（<span class="text-danger">{$v[0]}%↑</span>）
												<?php 
														}
													}
												?>
                                            </td>
                                            <td class="align-right">￥{$v[1]}</td>-->
                                            <td class="align-center">{$v['memo']}</td>
                                            <td class="align-center"><a href="javascript:" onclick="showinfo({$v['id']},{$v['frontsortid']})">修改</a> | <a href="javascript:" onclick="return delop({$v['id']},18,this)">删除</a> | <a href="#">卖出</a></td>
                                          </tr>
		                                  <?php endforeach?>
		                                  <script type="text/javascript">
		                                  $("#lccpsum").text({$countlccp + $countjj});
		                                  </script>
                                      </tbody>
                                      <tfoot>
                                          <tr>
                                            <td>合计</td>
                                            <td colspan="6" class="align-right">
                                         		<?php if($countjjzd < 0){
												?>
                                            	<span class="text-success">￥{$countjj}（{$countjjzd}%）↓</span>
                                           		 <?php }else{
                                           		 ?>
                                           		 <span class="text-danger">￥{$countjj}（{$countjjzd}%）↑</span>
                                           		 <?php 
													}
												?>
                                            </td>
                                          </tr>
                                      </tfoot>
                                    </table>
                                </div>
                            </td>
                          </tr>
                          <!--股票-->
                          <tr>
                            <td><a href="javascript:void(0)" class="ctr_img"><img src="__ROOT__/images/details_close.png" /></a> 股票</td>
                            <td class="align-right">￥36500</td>
                            <td class="align-right"><span class="text-success">-￥320.30（0.1%） ↓</span></td>
                            <td class="align-right"><span class="text-danger">+￥1500（1%）↑</span></td>
                          </tr>
                          <tr class="tr_detail" id="zhmx_gp">
                            <td colspan="4" class="table_detail">
                                <div class="zhmx_detail">
                                    <table class="table table-hover table-bordered">
                                      <thead>
                                          <tr>
                                            <th width="20%">机构/名称代码</th>
                                            <th width="10%" class="align-right">金额</th>
                                            <th width="11%" class="align-right">成本价/现价</th>
                                            <th width="8%" class="align-center">数量</th>
                                            <th width="15%" class="align-center">盈亏（当日/累计）</th>
                                            <th width="10%" class="align-right">现值</th>
                                            <th>备注</th>
                                            <th width="18%" class="align-center">操作</th>
                                          </tr>
                                      </thead>
                                      <tbody>
                                          <tr>
                                            <td>中铁XXX</td>
                                            <td class="align-right">20000.00</td>
                                            <td class="align-right">6.82/7.21</td>
                                            <td class="align-center">1000</td>
                                            <td class="align-right"><span class="text-danger">3%↑</span>/<span class="text-danger">20%↑</span></td>
                                            <td class="align-right">35200.00</td>
                                            <td>-</td>
                                            <td class="align-center"><a href="#">添加</a> | <a href="#">修改</a> | <a href="#">删除</a> | <a href="#">卖出</a></td>
                                          </tr>
                                      </tbody>
                                      <tfoot>
                                          <tr>
                                            <td>合计</td>
                                            <td colspan="7" class="align-right">￥36500（1%）</td>
                                          </tr>
                                      </tfoot>
                                    </table>
                                </div>
                            </td>
                          </tr>
                          <!--贵重物品-->
                          <tr>
                            <td><a href="javascript:void(0)" class="ctr_img"><img src="__ROOT__/images/details_close.png" /></a> 贵重物品</td>
                            <td class="align-right" id="qtsum"></td>
                            <td class="align-right"><span class="text-success">-￥320.30（0.1%） ↓</span></td>
                            <td class="align-right"><span class="text-danger">+￥1500（1%）↑</span></td>
                          </tr>
                          <tr class="tr_detail" id="zhmx_gz">
                            <td colspan="4" class="table_detail">
                                <div class="zhmx_detail">
                                    <table class="table table-hover table-bordered">
                                      <thead>
                                          <tr>
                                            <th width="20%">名称</th>
                                            <th width="20%" class="align-right">价格</th>
                                            <th>备注</th>
                                            <th width="18%" class="align-center">操作</th>
                                          </tr>
                                      </thead>
                                      <tbody>
                                    	 <?php foreach ($userotherlist as $k => $v):
	      	                              	$countqt += $v['money'];
	      	                              ?>
                                         <tr>
                                            <td style="display:none">{$v['id']}</td>
                                            <td>{$v['productname']}</td>
                                            <td class="align-right">{$v['money']}</td>
                                            <td>{$v['memo']}</td>
                                            <td class="align-center"><a href="#">添加</a> | <a href="javascript:" onclick="showinfo({$v['id']},{$v['frontsortid']})">修改</a> | <a href="javascript:" onclick="return delop({$v['id']},21,this)">删除</a></td>
                                         </tr>
		                                 <?php endforeach?>
		                                 <script type="text/javascript">
		                                  $("#qtsum").text("￥"+{$countqt});
		                                 </script>
                                      </tbody>
                                      <tfoot>
                                          <tr>
                                            <td>合计</td>
                                            <td colspan="4" class="align-right">￥{$countqt}（1%）</td>
                                          </tr>
                                      </tfoot>
                                    </table>
                                </div>
                            </td>
                          </tr>
                          <!--保险-->
                          <tr>
                            <td><a href="javascript:void(0)" class="ctr_img"><img src="__ROOT__/images/details_close.png" /></a> 保险</td>
                            <td class="align-right" id="bxsum"></td>
                            <td class="align-right"><span class="text-success">-￥320.30（0.1%） ↓</span></td>
                            <td class="align-right"><span class="text-danger">+￥1500（1%）↑</span></td>
                          </tr>
                          <tr class="tr_detail" id="zhmx_bx">
                            <td colspan="4" class="table_detail">
                                <div class="zhmx_detail">
                                    <table class="table table-hover table-bordered">
                                      <thead>
                                          <tr>
                                            <!-- <th width="20%">机构</th> -->
                                            <th width="15%">名称</th>
                                            <th width="12%" class="align-right">保额</th>
                                            <th width="12%" class="align-right">保费</th>
                                            <th width="12%" class="align-center">缴费日期</th>
                                            <th>备注</th>
                                            <th width="18%" class="align-center">操作</th>
                                          </tr>
                                      </thead>
                                      <tbody>
                                           <!-- <td>太平洋保险</td> -->
                                       	 <?php foreach ($userinsurancelist as $k => $v):
	      	                              	$countbx += $v['premium'];
	      	                              ?>
                                         <tr>
                                            <td>{$v['productname']}</td>
                                            <td class="align-right">{$v['coverage']}</td>
                                            <td class="align-right">{$v['premium']}</td>
                                            <td class="align-center">{$v['mytime']}</td>
                                            <td>{$v['memo']}</td>
                                            <td class="align-center"><a href="#">添加</a> | <a href="javascript:" onclick="showinfo({$v['id']},{$v['frontsortid']})">修改</a> | <a href="javascript:" onclick="return delop({$v['id']},13,this)">删除</a></td>
                                         </tr>
		                                 <?php endforeach?>
		                                 <script type="text/javascript">
		                                  $("#bxsum").text("￥"+{$countbx});
		                                 </script>
                                      </tbody>
                                      <tfoot>
                                          <tr>
                                            <td>合计</td>
                                            <td colspan="6" class="align-right">￥{$countbx}（1%）</td>
                                          </tr>
                                      </tfoot>
                                    </table>
                                </div>
                            </td>
                          </tr>
                          <!--车房-->
                          <tr>
                            <td><a href="javascript:void(0)" class="ctr_img"><img src="__ROOT__/images/details_close.png" /></a> 车房</td>
                            <td class="align-right" id="fsum"></td>
                            <td class="align-right"><span class="text-success">-￥320.30（0.1%） ↓</span></td>
                            <td class="align-right"><span class="text-danger">+￥1500（1%）↑</span></td>
                          </tr>
                          <tr class="tr_detail" id="zhmx_cf">
                            <td colspan="4" class="table_detail">
                                <div class="zhmx_detail">
                                    <div class="zc_type">
                                    	<span class="label label-primary">房产</span>
                                    </div>
                                    <table class="table table-hover table-bordered">
                                      <thead>
                                          <tr>
                                            <th width="20%">小区</th>
                                            <th width="14%" class="align-right">金额</th>
                                            <th width="12%" class="align-right">面积</th>
                                            <th width="12%" class="align-center">日期</th>
                                            <th>备注</th>
                                            <th width="18%" class="align-center">操作</th>
                                          </tr>
                                      </thead>
                                      <tbody>
                                       <?php foreach ($userimmovableFlist as $k => $v):
	      	                              	$countf += $v['money'];
	      	                              ?>
                                         <tr>
                                            <td class="">{$v['communityname']}</td>
                                            <td class="align-right">￥{$v['money']}</td>
                                            <td class="align-right">{$v['space']}m<sup>2</sup></td>
                                            <td class="align-center">{$v['mytime']}</td>
                                            <td>{$v['memo']}</td>
                                            <td class="align-center"><a href="#">添加</a> | <a href="javascript:" onclick="showinfo({$v['id']},{$v['frontsortid']})">修改</a> | <a href="javascript:" onclick="return delop({$v['id']},20,this)">删除</a></td>
                                         </tr>
		                                 <?php endforeach?>
                                      </tbody>
                                      <tfoot>
                                          <tr>
                                            <td>合计</td>
                                            <td colspan="5" class="align-right"><span class="text-danger">￥{$countf}（8%）↑</span></td>
                                          </tr>
                                      </tfoot>
                                    </table>
                                    <div class="zc_type">
                                    	<span class="label label-primary">车产</span>
                                    </div>
                                    <table class="table table-hover table-bordered">
                                      <thead>
                                          <tr>
                                            <th width="20%">品牌</th>
                                            <th width="14%" class="align-right">金额</th>
                                            <th width="12%" class="align-center">日期</th>
                                            <th>备注</th>
                                            <th width="18%" class="align-center">操作</th>
                                          </tr>
                                      </thead>
                                      <tbody>
                 	                     <?php foreach ($userimmovableClist as $k => $v):
	      	                              	$countc += $v['money'];
	      	                              ?>
                                          <tr>
                                            <td class="">{$v['productname']}</td>
                                            <td class="align-right">￥{$v['money']}</td>
                                            <td class="align-center">{$v['mytime']}</td>
                                            <td>{$v['memo']}</td>
                                            <td class="align-center"><a href="#">添加</a> | <a href="javascript:" onclick="showinfo({$v['id']},{$v['frontsortid']})">修改</a> | <a href="javascript:" onclick="return delop({$v['id']},20,this)">删除</a></td>
                                          </tr>
		                                 <?php endforeach?>
		                                 <script type="text/javascript">
		                                  $("#fsum").text("￥"+{$countf + $countc});
		                                 </script>

                                      </tbody>
                                      <tfoot>
                                          <tr>
                                            <td>合计</td>
                                            <td colspan="4" class="align-right"><span class="text-danger">￥{$countc}（8%）↑</span></td>
                                          </tr>
                                      </tfoot>
                                    </table>
                                </div>
                            </td>
                          </tr>
                          <!--欠款-->
                          <tr>
                            <td><a href="javascript:void(0)" class="ctr_img"><img src="__ROOT__/images/details_close.png" /></a> 欠款</td>
                            <td class="align-right" id="qksum"></td>
                            <td class="align-right"><span class="text-success">-￥320.30（0.1%） ↓</span></td>
                            <td class="align-right"><span class="text-danger">+￥1500（1%）↑</span></td>
                          </tr>
                          <tr class="tr_detail" id="zhmx_qk">
                            <td colspan="4" class="table_detail">
                                <div class="zhmx_detail">
                                    <div class="zc_type">
                                    	<span class="label label-primary">信用卡</span>
                                    </div>
                                    <table class="table table-hover table-bordered">
                                      <thead>
                                          <tr>
                                            <th width="20%">银行</th>
                                            <th width="14%" class="align-right">欠款</th>
                                            <th width="12%" class="align-center">还款日</th>
                                            <th>备注</th>
                                            <th width="18%" class="align-center">操作</th>
                                          </tr>
                                      </thead>
                                      <tbody>
                                         <?php foreach ($userxyklist as $k => $v):
	      	                              	$countxyk += $v['money'];
	      	                              ?>
										 <tr>
                                            <td class="">{$v['bankname']}</td>
                                            <td class="align-right">￥{$v['money']}</td>
                                            <td class="align-center">{$v['mytime']}</td>
                                            <td>{$v['memo']}</td>
                                            <td class="align-center"><a href="#">添加</a> | <a href="javascript:" onclick="showinfo({$v['id']},{$v['frontsortid']})">修改</a> | <a href="javascript:" onclick="return delop({$v['id']},30,this)">删除</a></td>
                                          </tr>
		                                 <?php endforeach?>
                                      </tbody>
                                      <tfoot>
                                          <tr>
                                            <td>合计</td>
                                            <td colspan="4" class="align-right"><span class="text-danger">￥{$countxyk}（8%）↑</span></td>
                                          </tr>
                                      </tfoot>
                                    </table>
                                    <div class="zc_type">
                                    	<span class="label label-primary">贷款</span>
                                    </div>
                                    <table class="table table-hover table-bordered">
                                      <thead>
                                          <tr>
                                            <th width="20%">银行</th>
                                            <th width="14%" class="align-right">贷款金额</th>
                                            <th width="12%" class="align-center">还款日</th>
                                            <th width="12%" class="align-right">月还款</th>
                                            <th>备注</th>
                                            <th width="18%" class="align-center">操作</th>
                                          </tr>
                                      </thead>
                                      <tbody>
	                                      	<?php foreach ($userdklist as $k => $v):
	      	                              	$countdk += $v['money'];
	      	                              ?>
	                                         <tr>
	                                            <td class="">{$v['bankname']}</td>
	                                            <td class="align-right">￥{$v['money']}</td>
	                                            <td class="align-center">{$v['mytime']}</td>
	                                            <td class="align-right">￥{$v['repayment']}</td>
	                                            <td>{$v['memo']}</td>
	                                            <td class="align-center"><a href="#">添加</a> | <a href="javascript:" onclick="showinfo({$v['id']},{$v['frontsortid']})">修改</a> | <a href="javascript:" onclick="return delop({$v['id']},30,this)">删除</a></td>
	                                          </tr>
			                                 <?php endforeach?>
                                      </tbody>
                                      <tfoot>
                                          <tr>
                                            <td>合计</td>
                                            <td colspan="5" class="align-right"><span class="text-danger">￥{$countdk}（8%）↑</span></td>
                                          </tr>
                                      </tfoot>
                                    </table>
                                    <div class="zc_type">
                                    	<span class="label label-primary">借款</span>
                                    </div>
                                    <table class="table table-hover table-bordered">
                                      <thead>
                                          <tr>
                                            <th width="20%" class="align-right">金额</th>
                                            <th width="14%" class="align-center">借款时间</th>
                                            <th>备注</th>
                                            <th width="18%" class="align-center">操作</th>
                                          </tr>
                                      </thead>
                                      <tbody>
                                    	  <?php foreach ($userjklist as $k => $v):
	      	                              	$countjk += $v['money'];
	      	                              ?>
	                                          <tr>
	                                            <td class="align-right">￥{$v['money']}</td>
	                                            <td class="align-center">{$v['mytime']}</td>
	                                            <td>{$v['memo']}</td>
	                                            <td class="align-center"><a href="#">添加</a> | <a href="javascript:" onclick="showinfo({$v['id']},{$v['frontsortid']})">修改</a> | <a href="javascript:" onclick="return delop({$v['id']},30,this)">删除</a></td>
	                                          </tr>
		                                 <?php endforeach?>
		                                 <script type="text/javascript">
		                                  $("#qksum").text("￥"+{$countxyk + $countdk + $countjk });
		                                 </script>
                                      </tbody>
                                      <tfoot>
                                          <tr>
                                            <td>合计</td>
                                            <td colspan="3" class="align-right"><span class="text-danger">￥{$countjk}（8%）↑</span></td>
                                          </tr>
                                      </tfoot>
                                    </table>
                                </div>
                            </td>
                          </tr>
                      </tbody>
                    </table>

                </div>
                <div class="clear"></div>
                
          </div>
        </div>
    </div>
</div>
<!--主体结束-->
<!--底部开始-->
<include file="./foot" />
<!--底部结束-->

<!--添加投资弹出层开始-->
<div id="addInvest" class="reveal-modal">
     <div class="panel">
            <!--<div class="panel-head">
                投资明细录入
                
            </div>-->
            <a class="close-reveal-modal close_layer" id="aclose">&#215;</a>
            <div class="panel-body">
                <div class="addInvest_title">
                    <div class="left" style="width:20%;padding:0 15px;" id="divzclb"><span style="margin:0;">资产类别</span></div>
                    <div class="left" style="width:80%;padding:0 20px;"><span>输入内容</span></div>
                </div>
                <div class="addInvest_tab" id="divtab">
                    <span class="on" onclick="showdiv(18)" id="span18"><i class="fa fa-usd"></i>理财产品</span>
                    <span class="" onclick="showdiv(17)" id="span17"><i class="fa fa-money"></i>银行存款</span>
                    <span class="" onclick="showdiv(19)" id="span19"><i class="fa fa-bar-chart-o"></i>股票</span>
                    <span class="" onclick="showdiv(13)" id="span13"><i class="fa fa-heart-o"></i>保险</span>
                    <span class="" onclick="showdiv(20)" id="span20"><i class="fa fa-home"></i>房产汽车</span>
                    <span class="" onclick="showdiv(21)" id="span21"><i class="fa fa-gift"></i>贵重物品、其它</span>
                    <span class="" onclick="showdiv(30)" id="span30"><i class="fa fa-credit-card"></i>欠款</span>
                    <!--<span class="">0</span>
                    <span class="">0</span>
                    <span class="">0</span>
                    <span class="">0</span>-->
                    <div class="clear"></div>
                </div>
                <div class="addInvest_con">
                    <!--资产开始-->
                  
                    <div class="addInvest_con_list" id="div_content_18">
                        <!--理财产品-->
                        <div id="div_18" class="divinfo">
                           <p id='pmc18'>
                                <label>代码/名称：</label>
                                <input name="" type="text" class="form-control" id="txtproductID18">
                                <span id="spanproductID18" class="notice_wrong" style="display:none;"><i class="fa fa-times-circle"></i></span>
                            </p>
                           <p id="plx18">
                                <label>类型：</label>
                                <span class="forRadio">
                                    <input name="radSortName18" type="radio" value="3" class="radioItem18"  checked/>基金
                                </span>
                                <span class="forRadio">
                                    <input name="radSortName18" type="radio" value="4" class="radioItem18"/>理财产品
                                </span>
                                <span class="forRadio">
                                    <input name="radSortName18" type="radio" value="34" class="radioItem18"/>国债
                                </span>
                                <span class="forRadio">
                                    <input name="radSortName18" type="radio" value="7" class="radioItem18"/>信托
                                </span> 
                                <span class="forRadio">
                                    <input name="radSortName18" type="radio" value="22" class="radioItem18"/>资管
                                </span>
                                <span class="forRadio">
                                    <input name="radSortName18" type="radio" value="23" class="radioItem18"/>P2P
                                </span>
                                <span id="" class="notice_wrong" style="display:none;"><i class="fa fa-times-circle"></i></span>
                           </p>
                           <p id="pzglx18">
                           		<label>类型：</label>
                                <span class="forRadio">
                                    <input name="radSortName18_1" type="radio" value="1" class="radioItem18_1" checked/>股票型
                                </span>
                                <span class="forRadio">
                                    <input name="radSortName18_1" type="radio" value="3" class="radioItem18_1"  />债券型
                                </span>
                                <span class="forRadio">
                                    <input name="radSortName18_1" type="radio" value="7" class="radioItem18_1" />另类
                                </span>
                                <span id="" class="notice_wrong" style="display:none;"><i class="fa fa-times-circle"></i></span>
                           </p>
                           <p id="pjjlx18">
                           		<label style="float:left">基金类型：</label>
                                <span style="display:inline-block;width:75%;">
                                <span class="forRadio">
                                    <input name="radSortName18_2" type="radio" value="1" class="radioItem18_2" checked/>股票型
                                </span>
                                <span class="forRadio">
                                    <input name="radSortName18_2" type="radio" value="2" class="radioItem18_2"  />混合型
                                </span>
                                <span class="forRadio">
                                    <input name="radSortName18_2" type="radio" value="3" class="radioItem18_2"  />债券型
                                </span>
                                <span class="forRadio">
                                    <input name="radSortName18_2" type="radio" value="4" class="radioItem18_2"  />保本型
                                </span>
                                <span class="forRadio">
                                    <input name="radSortName18_2" type="radio" value="5" class="radioItem18_2" />货币型
                                </span>
                                <span class="forRadio">
                                    <input name="radSortName18_2" type="radio" value="6" class="radioItem18_2" />其它型
                                </span>
                                <span id="" class="notice_wrong" style="display:none;"><i class="fa fa-times-circle"></i></span>
                                </span>
                           </p>
                           <p id='pjgmc18'>
                                <label>购买机构：</label>
                                <input name="" type="text" class="form-control" id="txtinstitution18">
                                <span id="spaninstitution18" class="notice_wrong" style="display:none;"><i class="fa fa-times-circle"></i></span>
                           </p>
                            <p id='pje18'>
                                <label>购买金额：</label>
                                <input name="" type="text" class="form-control" id="txtmoney18">
                                <span id="spanmoney18" class="notice_wrong" style="display:none;"><i class="fa fa-times-circle"></i></span>
                            </p>
                            <p id='pgmfe18'>
                                <label>购买份额：</label>
                                <input name="" type="text" class="form-control" id="txtbuyshare18">
                                <span id="spanbuyshare18" class="notice_wrong" style="display:none;"><i class="fa fa-times-circle"></i></span>
                            </p>
                            <p id='psxf18'>
                                <label>手续费：</label>
                                <input name="" type="text" class="form-control" id="txtprice18">%
                                <span id="spanprice18" class="notice_wrong" style="display:none;"><i class="fa fa-times-circle"></i></span>
                            </p>
                            <p id='pqx18'>
                                <label>期限：</label>
                                <input name="" type="text" class="form-control" id="txtlimit18">(天)
                                <span id="spanlimit18" class="notice_wrong" style="display:none;"></span>
                            </p>
                           <p id='pgmrq18'>
                                <label>购买日期：</label>
                                <input name="" type="text" class="form-control Wdate"   id="txtbuytime18">
                                <span id="spanbuytime18" class="notice_wrong" style="display:none;"><i class="fa fa-times-circle"></i></span>
                           </p>
                            <p id='psy18'>
                                <label>收益率：</label>
                                <input name="" type="text" class="form-control" id="txtrate18">(年化%)
                                <span id="spanrate18" class="notice_wrong" style="display:none;"><i class="fa fa-times-circle"></i></span>
                            </p>
                            <p id='pqxrq18'>
                                <label>起息日期：</label>
                                <input name="" type="text" class="form-control Wdate" onfocus="WdatePicker()"  id="txtStartDate18">
                                <span id="spanStartDate18" class="notice_wrong" style="display:none;"><i class="fa fa-times-circle"></i></span>
                            </p>
                            <p id='pbz18'>
                                <label>备注：</label>
                                <textarea class="form-control" id="txtmemo18"></textarea> 
                                <span id="spanmemo18" class="notice_wrong" style="display:none;"><i class="fa fa-times-circle"></i>提示提示提示</span>
                            </p>
                            <p id='pbtn18'>
                                <label>　</label>
                                <input value="保 存" type="button" class="btn btn-danger" id="btnadd18">
                                <input value="保存并继续添加" type="button" class="btn btn-success" id="btnaddall18">
                            </p>
                        </div>
                    </div>
                      <div class="addInvest_con_list" id="div_content_17">
                        <!--银行存款-->
                        <div id="div_17" class="divinfo">
                            <p>
                                <label>币种：</label>
                                <select class="form-control" name="" id="selcurrency17">
                                	<option value="-1">请选择</option>
                                   <?php foreach ($currencylist as $k => $v):?>
                                      <option value="{$v['currencyid']}">{$v['abbreviation']} {$v['cnname']}</option>
                                   <?php endforeach?>
                                </select>
                                <span id="spancurrency17" class="notice_wrong" style="display:none;"></span>
                            </p>
                            <p>
                                <label>金额：</label>
                                <input name="" type="text" class="form-control" id="txtMoney17">
                                <span id="spanMoney17" class="notice_wrong" style="display:none;"><i class="fa fa-times-circle"></i>提示提示提示</span>
                            </p>
                            <p>
                                <label>备注：</label>
                                <textarea class="form-control" id="txtmemo17"></textarea> 
                                <span id="spanmemo17" class="notice_wrong" style="display:none;"><i class="fa fa-times-circle"></i>提示提示提示</span>
                            </p>
                            <p>
                                <label>　</label>
                                <input value="保 存" type="button" class="btn btn-danger" id="btnadd17">
                                <input value="保存并继续添加" type="button" class="btn btn-success" id="btnaddall17">
                            </p>
                       </div>
                    </div>
                    <div class="addInvest_con_list" id="div_content_19">
                        <!--股票-->
                        <div id="div_19" class="divinfo">
                            <p id='pmc19'>
                                <label>代码/名称：</label>
                                <input name="" type="text" class="form-control" id="txtproductID19">
                                <span id="" class="notice_wrong" style="display:none;"><i class="fa fa-times-circle"></i></span>
                            </p>
                            <p id='pje19'>
                                <label>购买金额：</label>
                                <input name="" type="text" class="form-control" id="txtmoney19">
                                <span id="spanmoney19" class="notice_wrong" style="display:none;"><i class="fa fa-times-circle"></i></span>
                            </p>
                            <p id='pgs19'>
                                <label>购买股数：</label>
                                <input name="" type="text" class="form-control" id="txtshare19">
                                <span id="spanshare19" class="notice_wrong" style="display:none;"><i class="fa fa-times-circle"></i></span>
                            </p>
                            <p id='pjg19'>
                                <label>购买单价：</label>
                                <input name="" type="text" class="form-control" id="txtprice19">
                                <span id="spanprice19" class="notice_wrong" style="display:none;"><i class="fa fa-times-circle"></i></span>
                            </p> 
                            <p id='pgmrq19'>
                                <label>购买日期：</label>
                                <input name="" type="text" class="form-control Wdate" onfocus="WdatePicker()"  id="txtbuytime19">
                                <span id="spanbuytime19" class="notice_wrong" style="display:none;"><i class="fa fa-times-circle"></i></span>
                           </p>
                            <p id='pbz19'>
                                <label>备注：</label>
                                <textarea class="form-control" id="txtmemo19"></textarea> 
                                <span id="spanmemo19" class="notice_wrong" style="display:none;"><i class="fa fa-times-circle"></i>提示提示提示</span>
                            </p>
                            <p id='pbtn19'>
                                <label>　</label>
                                <input value="保 存" type="button" class="close-reveal-modal btn btn-danger" id="btnadd19">
                                <input value="保存并继续添加" type="button" class="btn btn-success" id="btnaddall19">
                            </p>    
                        </div>
                    </div>
                    <div class="addInvest_con_list" id="div_content_13">
                        <!--保险-->
                        <div id="div_13" class="divinfo">
                            <p id='pmc13'>
                                <label>代码/名称：</label>
                                <input name="" type="text" class="form-control" id="txtproductID13">
                                <span id="spanproductname13" class="notice_wrong" style="display:none;"><i class="fa fa-times-circle"></i></span>
                            </p>
                            <p id='plx13'>
                                <label>类型：</label>
                                <span class="forRadio">
                                    <input name="radSortName13" type="radio" value="27" class="radioItem13" checked />投资型
                                </span>
                                <span class="forRadio">
                                    <input name="radSortName13" type="radio" value="28" class="radioItem13"/>消费型
                                </span>
                                <span class="forRadio">
                                    <input name="radSortName13" type="radio" value="29" class="radioItem13"/>健康养老
                                </span>
                                <span id="" class="notice_wrong" style="display:none;"><i class="fa fa-times-circle"></i></span>
                           </p>
                            <p id='pbe13'>
                                <label>保额：</label>
                                <input name="" type="text" class="form-control" id="txtcoverage13">
                                <span id="spancoverage13" class="notice_wrong" style="display:none;"><i class="fa fa-times-circle"></i></span>
                            </p>
                            <p id='pbf13'>
                                <label>保费：</label>
                                <input name="" type="text" class="form-control" id="txtpremium13">
                                <span id="spanpremium13" class="notice_wrong" style="display:none;"><i class="fa fa-times-circle"></i></span>
                            </p>
                            <p id='pjfrq13'>
                                <label>缴费日期：</label>
                                <input name="" type="text" class="form-control Wdate" onfocus="WdatePicker()"  id="txtpayment13">
                                <span id="spanpayment13" class="notice_wrong" style="display:none;"><i class="fa fa-times-circle"></i></span>
                            </p>
                            <p id='pbz13'>
                                <label>备注：</label>
                                <textarea class="form-control" id="txtmemo13"></textarea> 
                                <span id="spanmemo13" class="notice_wrong" style="display:none;"><i class="fa fa-times-circle"></i>提示提示提示</span>
                            </p>
                            <p id='ptxrq13'>
                                <label>提醒日期：</label>
                                <input name="chkismessage13" id="chkismessage13" type="checkbox" value="" />
                                                                                                                 缴费日期前一周自动提醒
                                <span id="spanpayment13" class="notice_wrong" style="display:none;"><i class="fa fa-times-circle"></i></span>
                            </p>
                            <p id="pbtn13">
                                <label>　</label>
                                <input value="保 存" type="button" class="btn btn-danger" id="btnadd13">
                                <input value="保存并继续添加" type="button" class="btn btn-success" id="btnaddall13">
                            </p>
                        </div>
                    </div>
                     <div class="addInvest_con_list" id="div_content_20">
                        <!--房车-->
                        <div id="div_20" class="divinfo">
                           <p id='plx20'>
                                <label>类型：</label>
                                <span class="forRadio">
                                    <input name="radSortName20" type="radio" value="15" class="radioItem20" checked />房屋
                                </span>
                                <span class="forRadio">
                                    <input name="radSortName20" type="radio" value="16" class="radioItem20"/>车辆
                                </span>
                                <span id="" class="notice_wrong" style="display:none;"><i class="fa fa-times-circle"></i></span>
                           </p>
                            <p id='pmc20'>
                                <label>房屋名称：</label>
                                <input name="" type="text" class="form-control" id="txthousename20">
                                <span id="spanhousename20" class="notice_wrong" style="display:none;"><i class="fa fa-times-circle"></i></span>
                            </p>
                            <p id='ppp20'>
                                <label>汽车品牌：</label>
                                <input name="" type="text" class="form-control" id="txtbrand20">
                                <span id="spanbrand20" class="notice_wrong" style="display:none;"><i class="fa fa-times-circle"></i></span>
                            </p>
                            <p id="pssmc20">
                                <label>省市名称：</label>
                                <select class="form-control" name="" id="selprovince20">
                                	<option value="-1">选择省份</option>
    	                           <?php foreach ($provincelist as $k => $v):?>
                                      <option value="{$v['provinceID']}">{$v['province']}</option>
                                   <?php endforeach?>
                                </select>
                                <select class="form-control" name="" id="selcity20">
                                	<option value="-1">选择城市</option>
                                </select>
                                <select class="form-control" name="" id="selarea20">
                                	<option value="-1">选择地区</option>
                                </select>
                                <span id="spanpc20" class="notice_wrong" style="display:none;"></span>
                            </p>
                            <p id='pxqmc20'>
                                <label>小区名称：</label>
                                <input name="" type="text" class="form-control" id="txtcommunity20">
                                <span id="spancommunity20" class="notice_wrong" style="display:none;"><i class="fa fa-times-circle"></i></span>
                            </p>
                            <p id='pgmje20'>
                                <label>购买金额：</label>
                                <input name="" type="text" class="form-control" id="txtmoney20">
                                <span id="spanmoney20" class="notice_wrong" style="display:none;"><i class="fa fa-times-circle"></i></span>
                            </p>
                            <p id='pfwmj20'>
                                <label>房屋面积：</label>
  								<input name="" type="text" class="form-control" id="txtspace20">m<sup>2</sup>
                                <span id="spanspace20" class="notice_wrong" style="display:none;"><i class="fa fa-times-circle"></i></span>
                            </p>
                            <p id='pgmrq20'>
                                <label>购买日期：</label>
                                <input name="" type="text" class="form-control Wdate" onfocus="WdatePicker()"  id="txtbuytime20">
                                <span id="spanbuytime20" class="notice_wrong" style="display:none;"><i class="fa fa-times-circle"></i></span>
                            </p>
                            <p id='pbz20'>
                                <label>备注：</label>
                                <textarea class="form-control" id="txtmemo20"></textarea> 
                                <span id="spanmemo20" class="notice_wrong" style="display:none;"><i class="fa fa-times-circle"></i>提示提示提示</span>
                            </p>
                            <p id="pbtn20">
                                <label>　</label>
                                <input value="保 存" type="button" class="btn btn-danger" id="btnadd20">
                                <input value="保存并继续添加" type="button" class="btn btn-success" id="btnaddall20">
                            </p>
                        </div>
                    </div>
                    <div class="addInvest_con_list" id="div_content_21">
                        <!--贵重物品-->
                        <div id="div_21" class="divinfo" >
                            <p id="pmc21">
                                <label>名称：</label>
                                <input name="" type="text" class="form-control" id="txtproductName21">
                                <span id="spanproductName21" class="notice_wrong" style="display:none;"><i class="fa fa-times-circle"></i></span>
                            </p>
                            <p id="pgmje21">
                                <label>购买金额：</label>
                                <input name="" type="text" class="form-control" id="txtmoney21">
                                <span id="spanmoney21" class="notice_wrong" style="display:none;"><i class="fa fa-times-circle"></i></span>
                            </p>    
                             <p id="pbz21">
                                <label>备注：</label>
                                <input name="" type="text" class="form-control" id="txtmemo21">
                                <span id="spanmemo21" class="notice_wrong" style="display:none;"><i class="fa fa-times-circle"></i></span>
                            </p>   
                            <p id="pbtn21">
                                <label>　</label>
                                <input value="保 存" type="button" class="close-reveal-modal btn btn-danger" id="btnadd21">
                                <input value="保存并继续添加" type="button" class="btn btn-success" id="btnaddall21">
                            </p>
                        </div>
                    </div>
                    <div class="addInvest_con_list" id="div_content_30">
                        <!--欠款-->
                        <div id="div_30" class="divinfo">
                           <p id='plx30'>
                                <label>类型：</label>
                                <span class="forRadio">
                                    <input name="radSortName30" type="radio" value="31" class="radioItem30" checked />信用卡
                                </span>
                                <span class="forRadio">
                                    <input name="radSortName30" type="radio" value="32" class="radioItem30"/>贷款
                                </span>
                                <span class="forRadio">
                                    <input name="radSortName30" type="radio" value="33" class="radioItem30"/>欠款
                                </span>
                                <span id="" class="notice_wrong" style="display:none;"><i class="fa fa-times-circle"></i></span>
                           </p>
                           <p id='pdklx30'>
                                <label>贷款类型：</label>
                                <span class="forRadio">
                                    <input name="radSortName30_1" type="radio" value="1" class="radioItem30_1" checked />车贷
                                </span>
                                <span class="forRadio">
                                    <input name="radSortName30_1" type="radio" value="2" class="radioItem30_1"/>房贷
                                </span>
                                <span class="forRadio">
                                    <input name="radSortName30_1" type="radio" value="3" class="radioItem30_1"/>消费贷
                                </span>
                                <span id="" class="notice_wrong" style="display:none;"><i class="fa fa-times-circle"></i></span>
                           </p>
                            <p id="pyhmc30">
                                <label>银行名称：</label>
                                <select class="form-control" name="" id="selbankid30">
                                   <?php foreach ($banklist as $k => $v):?>
                                      <option value="{$v['bankid']}">{$v['bankname']}</option>
                                   <?php endforeach?>
                                </select>
                                <span id="spanbankid30" class="notice_wrong" style="display:none;"><i class="fa fa-times-circle"></i></span>
                            </p>
                            <p id="pyhkje">
                                <label>月还款金额：</label>
                                <input name="" type="text" class="form-control" id="txtrepayment30">
                                <span id="spanrepayment30" class="notice_wrong" style="display:none;"><i class="fa fa-times-circle"></i></span>
                            </p> 
                            <p id="pqkje30">
                                <label>欠款金额：</label>
                                <input name="" type="text" class="form-control" id="txtmoney30">
                                <span id="spanmoney30" class="notice_wrong" style="display:none;"><i class="fa fa-times-circle"></i></span>
                            </p> 
                            <p id="phkrq30">
                            
                            
                                <label>还款日期：</label>
                                <input name="" type="text" class="form-control Wdate" onfocus="WdatePicker()"  id="txtrepaymenttime30">
                                <span id="spanrepaymenttime30" class="notice_wrong" style="display:none;"><i class="fa fa-times-circle"></i></span>
                            </p> 
                            <p id="pjkrq30">
                                <label>借款日期：</label>
                                <input name="" type="text" class="form-control Wdate" onfocus="WdatePicker()"  id="txtlendtime30">
                                <span id="spanlendtime30" class="notice_wrong" style="display:none;"><i class="fa fa-times-circle"></i></span>
                            </p> 
                            <p id="pbz30">
                                <label>备注：</label>
                                <input name="" type="text" class="form-control" id="txtmemo30">
                                <span id="spanmemo30" class="notice_wrong" style="display:none;"><i class="fa fa-times-circle"></i></span>
                            </p>    
                            <p id='ptxrq30'>
                                <label>提醒日期：</label>
                                <input name="chkismessage30" type="checkbox" id="chkismessage30" value="" />
                                                                                                                 缴费日期前一周自动提醒
                                <span id="spanismessage30" class="notice_wrong" style="display:none;"><i class="fa fa-times-circle"></i></span>
                            </p>
                            <p id="pbtn30">
                                <label>　</label>
                                <input value="保 存" type="button" class="close-reveal-modal btn btn-danger" id="btnadd30">
                                <input value="保存并继续添加" type="button" class="btn btn-success" id="btnaddall30">
                            </p>
                        </div>
                    </div>
                    <div class="clear"></div>
                </div>
                <div class="clear"></div>
            </div>
     </div>
</div>
<!--添加投资弹出层结束-->
</form>
</body>
</html>
